Re: Adding Column in Specific Position of table - Mailing list pgsql-admin

From Craig James
Subject Re: Adding Column in Specific Position of table
Date
Msg-id CAFwQ8rdEJ5-Z6fz4=Wh0e--X64scLGRYGYLpwVi+TK2Rc9cEmw@mail.gmail.com
Whole thread Raw
In response to Re: Adding Column in Specific Position of table  (Jan Lentfer <Jan.Lentfer@web.de>)
List pgsql-admin
On Wed, Apr 29, 2015 at 2:51 AM, Jan Lentfer <Jan.Lentfer@web.de> wrote:
Hi, this is not currently possibly with just an ALTER TABLE. Regards, Jan.

Von meinem iPad gesendet

> Am 29.04.2015 um 11:43 schrieb Ankur Kaushik <ankurkaushik@gmail.com>:
>
>
> Hi ,
>
> I can I alter table to add column at specific position ,
>
> below
>
> Table : Post
>
>
> Column : a
>               b
>               d
>
> Want to add new column c before d or after b.

It's probably a bad idea, too. If your application depends on the ordering of the columns, I guarantee you'll regret it. It's a recipe for mysterious bugs.

Every SQL query should name the columns. If you do that, the column ordering doesn't matter.

Craig

pgsql-admin by date:

Previous
From: Jan Lentfer
Date:
Subject: Re: Adding Column in Specific Position of table
Next
From: "Ferrell, Denise CTR NSWCDD, Z11"
Date:
Subject: Graphic Interpretations of Data