dump - fix - restore (e.g. in production) you can always create
view(s) with ordinal positions of columns convenient for you.
2010/11/24 Dmitriy Igrishin <dmitigr@xxxxxxxxx>
Hey Alexander,
Ordinal positions of columns can't be set manually by ALTER TABLE.
2010/11/24 Alexander Farber <alexander.farber@xxxxxxxxx>
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
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
--
// Dmitriy.
--
// Dmitriy.