alter table add column - specify where the column will go? - Mailing list pgsql-general

From Alexander Farber
Subject alter table add column - specify where the column will go?
Date
Msg-id AANLkTi=V+R7BK0DQ0Y8ObT-u-QhZp2umK3i0Lv7+73mm@mail.gmail.com
Whole thread Raw
Responses Re: alter table add column - specify where the column will go?
Re: alter table add column - specify where the column will go?
Re: alter table add column - specify where the column will go?
List pgsql-general
Hello,

is there a syntax to add a column not at the last place, but
somewhere inbetween or do I have to dump/restore the table?

For example if I'd like to add last_logout right after last_login:

 \d pref_users;
                Table "public.pref_users"
   Column   |            Type             |   Modifiers
------------+-----------------------------+---------------
 id         | character varying(32)       | not null
 first_name | character varying(32)       |
 last_name  | character varying(32)       |
 female     | boolean                     |
 avatar     | character varying(128)      |
 city       | character varying(32)       |
 lat        | real                        |
 lng        | real                        |
 last_login | timestamp without time zone | default now()
 last_ip    | inet                        |
 medals     | smallint                    | default 0

Thank you
Alex

pgsql-general by date:

Previous
From: c k
Date:
Subject: Re: plpyhton
Next
From: Szymon Guz
Date:
Subject: Re: alter table add column - specify where the column will go?