Re: logical column ordering - Mailing list pgsql-hackers

From Arthur Silva
Subject Re: logical column ordering
Date
Msg-id CAO_YK0WFdagCBQhs8AierEknm9Ckynfxg7LumDmZpkBbcvPJ8A@mail.gmail.com
Whole thread Raw
In response to Re: logical column ordering  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
<p dir="ltr"><br /> On Feb 27, 2015 5:02 PM, "Alvaro Herrera" <<a
href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>>wrote:<br /> ><br /> > Arthur Silva
wrote:<br/> ><br /> > > Sorry to intrude, I've been following this post and I was wondering if it<br /> >
>would allow (in the currently planed form or in the future) a wider set of<br /> > > non-rewriting DDLs to
Postgres.For example, drop a column without<br /> > > rewriting the table.<br /> ><br /> > Perhaps.  But
droppinga column already does not rewrite the table, only<br /> > marks the column as dropped in system catalogs, so
doyou have a better<br /> > example.<br /> ><br /> > One obvious example is that you have<br /> ><br />
>CREATE TABLE t (<br /> >    t1 int,<br /> >    t3 int<br /> > );<br /> ><br /> > and later want to
addt2 in the middle, the only way currently is to<br /> > drop the table and start again (re-creating all dependant
views,FKs,<br /> > etc).  With the patch you will be able to add the column at the right<br /> > place.  If no
defaultvalue is supplied for the new column, no table<br /> > rewrite is necessary at all.<br /> ><br /> >
--<br/> > Álvaro Herrera                <a href="http://www.2ndQuadrant.com/">http://www.2ndQuadrant.com/</a><br />
>PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services<p dir="ltr">Cool! I didn't know I could
dropstuff without rewriting.<p dir="ltr">Ya, that's another example, people do these from GUI tools. That's a nice side
effect.Cool (again)! <br /> 

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Next
From: Tom Lane
Date:
Subject: Re: MemoryContext reset/delete callbacks