pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Adding a field to an existing table.
4+ messages / 2 participants
[nested] [flat]

* Adding a field to an existing table.
@ 2003-05-01 16:21 dlangschied <dlangschied@ameritech.net>
  2003-05-01 16:42 ` Re: Adding a field to an existing table. Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 1 reply; 4+ messages in thread

From: dlangschied @ 2003-05-01 16:21 UTC (permalink / raw)
  To: pgsql-admin

Hi again,
I want to know if it is possible to add a field to an existing table.  I
know I can drop the table and add it back, but that may not always be
desireable.  I am trying to convert a Progress database to postgres.  The
sequences are separate from the tables in Progress and they are serial
fields in postgres.  The easiest solution is to add the sequences as serial
fields to the postgres database, after the tables have been created.  This
would certainly be a pain in the #*#^$& if I had to create these serial
fields when I create the table.  I am trying to achieve a totally hands off
conversion of the database, but this particular issue has me concerned.

Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone:  (586)777-7542
Cell:      (248)789-8493
e-mail:  dlangschied@ameritech.net




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Adding a field to an existing table.
  2003-05-01 16:21 Adding a field to an existing table. dlangschied <dlangschied@ameritech.net>
@ 2003-05-01 16:42 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Stephan Szabo @ 2003-05-01 16:42 UTC (permalink / raw)
  To: dlangschied <dlangschied@ameritech.net>; +Cc: pgsql-admin


On Thu, 1 May 2003, dlangschied wrote:

> I want to know if it is possible to add a field to an existing table.  I

With some limitations about extra clauses (constraints, defaults) being
dropped on some versions, ALTER TABLE ADD COLUMN can add fields.




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Adding a field to an existing table.
@ 2003-05-01 16:31 dlangschied <dlangschied@ameritech.net>
  0 siblings, 0 replies; 4+ messages in thread

From: dlangschied @ 2003-05-01 16:31 UTC (permalink / raw)
  To: pgsql-admin

Hi!
I found the doc on sequences and this will work for me.  I am still curious,
however, if you can simply add a field to a table without first dropping it.

Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone:  (586)777-7542
Cell:      (248)789-8493
e-mail:  dlangschied@ameritech.net




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Adding a field to an existing table.
@ 2003-05-01 16:39 dlangschied <dlangschied@ameritech.net>
  0 siblings, 0 replies; 4+ messages in thread

From: dlangschied @ 2003-05-01 16:39 UTC (permalink / raw)
  To: Brian Panulla <brian@elmwoodmedia.com>; +Cc: pgsql-admin

Thanks!

Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone:  (586)777-7542
Cell:      (248)789-8493
e-mail:  dlangschied@ameritech.net
----- Original Message ----- 
From: "Brian Panulla" <brian@elmwoodmedia.com>
To: "dlangschied" <dlangschied@Ameritech.Net>
Sent: Thursday, May 01, 2003 12:36 PM
Subject: RE: [ADMIN] Adding a field to an existing table.


> Sure.... check the docs on ALTER TABLE. You can add new fields to a table
> and rename fields as well. I think the one thing you can't do is change
data
> type with an ALTER TABLE statement. You need to rename the field, add a
new
> one with the right data type, and migrate the data from old to new with a
> query.
>
> Brian
>
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of dlangschied
> Sent: Thursday, May 01, 2003 12:32 PM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] Adding a field to an existing table.
>
>
> Hi!
> I found the doc on sequences and this will work for me.  I am still
curious,
> however, if you can simply add a field to a table without first dropping
it.
>
> Sincerely,
>
> David Langschied
> Langschied Consulting Services
> 25644 Mackinac
> Roseville, MI 48066
>
> Phone:  (586)777-7542
> Cell:      (248)789-8493
> e-mail:  dlangschied@ameritech.net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2003-05-01 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-01 16:21 Adding a field to an existing table. dlangschied <dlangschied@ameritech.net>
2003-05-01 16:42 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2003-05-01 16:31 Adding a field to an existing table. dlangschied <dlangschied@ameritech.net>
2003-05-01 16:39 Re: Adding a field to an existing table. dlangschied <dlangschied@ameritech.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox