\d omits schema on inherited tables (Was: EXPLAIN omits schema?)
От | Josh Tolley |
---|---|
Тема | \d omits schema on inherited tables (Was: EXPLAIN omits schema?) |
Дата | |
Msg-id | e7e0a2570706131027y188c5578y6172f15f961afee9@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: \d omits schema on inherited tables (Was: EXPLAIN omits schema?)
|
Список | pgsql-hackers |
On 6/13/07, Tom Lane <tgl@sss.pgh.pa.us> wrote: > "Josh Tolley" <eggyknap@gmail.com> writes: > > On a different sideline based on the original note of this thread, > > much as EXPLAIN doesn't include the schema, \d doesn't include the > > schema to describe INHERIT relationships in 8.2.4. If you have two > > tables called PARENT, in two different schemas, and a child that > > inherits from one of them, \d won't tell you which of the two it > > inherits from. > > Yes it does, because that's actually regclass output. It'll be > schema-qualified if the table is not visible in your search path. I figured it was better to start a new thread, since this changes from the original topic. My test didn't display the schema despite the parent not being in my search path, as shown below: [jtolley@polonium ~]$ psql Welcome to psql 8.2.4, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g orterminate with semicolon to execute query \q to quit jtolley=# create schema a; CREATE SCHEMA jtolley=# create schema b; CREATE SCHEMA jtolley=# set search_path to a, public; SET jtolley=# create table parent (f int); CREATE TABLE jtolley=# set search_path to b, public; SET jtolley=# create table parent (g text); CREATE TABLE jtolley=# create table child () inherits (a.parent); CREATE TABLE jtolley=# \d child Table "b.child"Column | Type | Modifiers --------+---------+-----------f | integer | Inherits: parent jtolley=# \d parent Table "b.parent"Column | Type | Modifiers --------+------+-----------g | text | jtolley=# \d a.parent Table "a.parent"Column | Type | Modifiers --------+---------+-----------f | integer | jtolley=# set search_path to b; SET jtolley=# \d child Table "b.child"Column | Type | Modifiers --------+---------+-----------f | integer | Inherits: parent jtolley=# set search_path to a; SET jtolley=# \d b.child Table "b.child"Column | Type | Modifiers --------+---------+-----------f | integer | Inherits: parent
В списке pgsql-hackers по дате отправления: