From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Making view dump/restore safe at the column-alias level |
Date: | 2012-12-31 15:27:10 |
Message-ID: | 24797.1356967630@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <stark(at)mit(dot)edu> writes:
> I do wonder whether the SQL standard will do something obtuse enough
> that that's the only option for a large swathe of queries. Or is that
> the case already? The query syntax you're using here, is it standard
> SQL? Is it widely supported?
Yeah, it's standard --- there's nothing here that wasn't in SQL92.
(Although I notice that SQL still hasn't got any ALTER TABLE RENAME
command, much less a column rename command. I wonder whether the
committee is aware of these difficulties and has shied away from adding
RENAME because of them?)
As for widely supported, I can't imagine that the big boys don't have
this, although a quick test shows that mysql only has table aliases
not column aliases, ie you can do "FROM t1 AS t1x" but not
"FROM t1 AS t1x(y)". Still, if that's a consideration, inventing
our own syntax would be even further away from the goal. Also, the
patch goes to some lengths to not print column aliases unnecessarily
--- in fact, there are cases where the old code would print column
aliases but the patch will not.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2012-12-31 15:48:58 | Re: Behaviour of bgworker with SIGHUP |
Previous Message | Greg Stark | 2012-12-31 15:07:34 | Re: Making view dump/restore safe at the column-alias level |