Search Postgresql Archives

Re: Schema search path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/09/2010, at 8:56 AM, Tom Lane wrote:

Bruce Momjian <bruce@xxxxxxxxxx> writes:
Yaroslav Tykhiy wrote:
SELECT * FROM foo.bar WHERE bar.a=1;
                           ^^^ this means foo.bar

Do you think it's a feature or a bug? :-)

Feature, and SQL-standard behavior.

It might be worth pointing out that this has nothing to do with
search_path; rather, the key is that the FROM clause establishes
a table alias "bar" for the query.

Sure, that makes sense because it just extends the well-known aliasing for unqualified column names, as in "SELECT a FROM foo", to table names as well. But a remark on this feature in the SCHEMA related documentation pages can be a good idea IMHO.

Thanks!

Yar

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux