Search Postgresql Archives

Re: RES: Add column and specify the column position in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 17, 2006 at 05:48:52PM -0400, Emi Lu wrote:
> I think it is a very useful feature for postgresql to support it.
> 
> If we have this feature supported, I do not have to recreate the table 
> and resetup all foreign key constraints, views, triggers, etc that are 
> based on the table.

Uh, why do you have to do that? Please don't tell me you're using SELECT
*...

In any case, there's extensive discussion about this in the -hackers
archives. IIRC, there is consensus that this would be nice to have but
no one has cared enough to actually make it happen. There are some
non-trivial issues since this would mean either completely re-writing
the table when you do an ALTER or you'd have to be able to divorce the
catalog representation of a table with the on-disk representation.
Though there are other advantages to doing the later, it's non-trivial.

> >-->I am trying to insert one column to a specific position in a table.
> >-->
> >-->In mysql, I can do:
> >-->. create table test(id varchar(3), name varchar(12));
> >-->. alter table test add column givename varchar(12) after id;
> >-->
> >-->I am looking for similar things in postgresql to add a new 
> >-->column to the 
> >-->correct position in a table.
> >
> >-->Could someone hint me please.
> >-->Thanks alot!
> > 
> >
> 
> >Ying Lu
> >
> > 
> >
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
>       message can get through to the mailing list cleanly
> 

-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@xxxxxxxxxxxxx
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux