Re: TABLE command - Mailing list pgsql-hackers

From David Rowley
Subject Re: TABLE command
Date
Msg-id EC8762ECB30D491182C23DAF43CD211B@amd64
Whole thread Raw
In response to TABLE command  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut Wrote:
> If I read this right, SQL would allow writing
>
> TABLE foo;

Interesting; I managed to find it in the spec:

<Quote>
4) The <explicit table>
TABLE <table or query name>
is equivalent to the <table subquery>
( SELECT * FROM <table or query name> )
</Quote>

So going by that would the patch also have to support something like:

WITH a AS (SELECT * FROM b)
TABLE a; ?

I'd probably find it hard to find a use case. I'm too used to using SELECT *
FROM .. in psql. On the other hand last night I read a good web page
comparing the most popular RDBMS' for spec. compliance and PostgreSQL
probably was the most compliant all of the ones listed, (at least on the
topics covered). Oracle fails badly on '' IS NULL being true.

I enjoy seeing more spec compliant things being added. But on the other
hand, going with Tom's comments, if its lots of work for little gain...





pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: User defined I/O conversion casts
Next
From: Tom Lane
Date:
Subject: Re: PG_PAGE_LAYOUT_VERSION 5 - time for change