Re: Add Column BEFORE/AFTER another column
От
Bill Moran
Тема
Re: Add Column BEFORE/AFTER another column
Дата
Msg-id
20070824171118.6e37a202.wmoran@potentialtech.com
Ответ на
Add Column BEFORE/AFTER another column (Matthew)
Список
Дерево обсуждения
Add Column BEFORE/AFTER another column Matthew <mboehm@voilaip.com>
Re: Add Column BEFORE/AFTER another column Bill Moran <wmoran@potentialtech.com>
Re: Add Column BEFORE/AFTER another column Matthew <mboehm@voilaip.com>
Re: Add Column BEFORE/AFTER another column Robert Treat <xzilla@users.sourceforge.net>
Re: Add Column BEFORE/AFTER another column "Jaime Casanova" <systemguards@gmail.com>
Re: Add Column BEFORE/AFTER another column Robert Treat <xzilla@users.sourceforge.net>
Re: Add Column BEFORE/AFTER another column Erik Jones <erik@myemma.com>
Re: Add Column BEFORE/AFTER another column Tom Lane <tgl@sss.pgh.pa.us>
Re: Add Column BEFORE/AFTER another column Steve Atkins <steve@blighty.com>
In response to Matthew : > Hi gang, > In MySQL it is possible to add a column before/after another column. I > have not been able to find such syntax in the Postgres manual. Does this > ability exist? It does not. > Is my only solution to create a new table with the new column, copy the > data, delete the old table and rename the new one? The fact that you're asking this question is a hint that you're using unsafe coding practices that may bite you at some point. The order of columns is not guaranteed to be the same as when you do CREATE TABLE, it's just coincidence that they usually are. To get your columns in a specific order, specify the column names in that order in your SELECT statement. The SQL standard doesn't provide for any other way to guarantee column order, and neither does Postgres. -- Bill Moran http://www.potentialtech.com
В списке pgsql-general по дате отправления