From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | totocrenn(at)gmail(dot)com |
Cc: | "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14535: SET search_path and list tables |
Date: | 2017-02-08 15:03:33 |
Message-ID: | CAKFQuwZ-raZ9Ks9qjiwYhEVVU2OvJDV8qeswfA10DimTTTKPyg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Feb 8, 2017 at 4:33 AM, <totocrenn(at)gmail(dot)com> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 14535
> Logged by: Thomas Crenn
> Email address: totocrenn(at)gmail(dot)com
> PostgreSQL version: 9.6.1
> Operating system: Windows
> Description:
>
> Hi,
> I will explain the bug with an example :
>
> I have 2 SCHEMAS : test and demo
> Each schemas have the same TABLE : table
>
> Then I change the search path :
> SET search_path TO test, demo;
>
> So when I list all the tables with \dt I should have 2 tables : test.table
> and demo.table, but I only see test.table.
> After checking, the table demo.table exist but is just not display on the
> list.
>
> I guess it's because the query apply a DISTINCT only on the table and not
> on
> the couple (schema , table).
> I don't know if it's a bug or if this choice is justified so i have decided
> to report you this.
>
It is a choice - \dt, without a object schema specified, will show you the
single object that would be chosen if you have written a query in a
similar fashion:
i.e., SELECT * FROM table;
The table name above can only refer to a single object - chosen based upon
search_path order.
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Tiago Babo | 2017-02-08 15:30:38 | Re: BUG #14526: no unique or exclusion constraint matching the ON CONFLICT |
Previous Message | totocrenn | 2017-02-08 11:33:00 | BUG #14535: SET search_path and list tables |