From: | "Robert Haas" <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "Peter Eisentraut" <peter_e(at)gmx(dot)net> |
Cc: | "PG Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: TABLE command |
Date: | 2008-11-08 18:50:51 |
Message-ID: | 603c8f070811081050k79926d12x6547ae72abaa41af@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I was assigned to code-review this patch by pgsql-rrreviewers. I
don't have much to add to what's already been written, but here are my
thoughts.
1. I agree with Tom Lane's earlier comments that table_ref is not the
correct non-terminal. For example, this seems pretty strange:
rhaas=# table position('i' in 'team');
position
----------
0
As far as I can tell from looking around a bit (I don't actually have
a copy of the SQL:2008 spec), the intention is to allow only base
tables or views or references to WITH tables that are in scope. I'm
not sure there's any good reason for that, but with TABLE as the key
word it's just too weird to allow random functions, function-like
operators, etc.
2. Realizing that this patch may have only been intended as a
proof-of-concept, it's pretty incomplete. In addition to updating the
SGML documentation, it needs to update the psql documentation and tab
completion code, and maybe other, similar things that I'm not thinking
of.
rhaas=# \h table
No help available for "table".
Try \h with no arguments to see available help.
Incidentally, I noticed while looking at this that "\h with" also
fails, even though WITH can now be the first word of a valid SQL
statement. I think we ought to patch psql to return the same help for
WITH as it does for SELECT.
3. Although I don't feel strongly about it, I tend to disagree with
the notion that "we don't need this". It's not the most useful
feature in the world, but it's in the spec, and there are situations
where it may save a bit of typing. Since SQL tends to be somewhat
wordy, I think this is a good thing. YMMV.
I will update the status of this patch on the Wiki to "Waiting on author".
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-11-08 19:10:09 | Re: TABLE command |
Previous Message | Greg Stark | 2008-11-08 18:46:58 | Re: Windowing Function Patch Review -> Standard Conformance |