However you cannot currently remove a column...
Oh yes you can:
ALTER TABLE tbl DROP COLUMN whatever
http://www.postgresql.org/docs/view.php?version=7.3idoc=0fil
e=ddl-alter.html
IIRC it was introduced fairly recently (7.3?)
Doh! Really should get rid of 'Practical PostgreSQL' as
Hello,
I have a table with a bunch of records already inserted. When I want to add or remove
fields from the, what I've done is produce an sql file, add the fields to the create
table directive, and add the fields manually to each record to be inserted. Then I do
an
\i db_name
which destroys
I have a table with a bunch of records already inserted. When
I want to add or remove fields from the, what I've done is
produce an sql file, add the fields to the create table
directive, and add the fields manually to each record to be
inserted. Then I do an
\i db_name
which
On Thursday 26 June 2003 18:34, Benjamin Jury wrote:
(...)
You can use ALTER TABLE.
ALTER TABLE table ADD [column] column type
Can also rename columns, add constraints, change to NOT NULL, etc.
However you cannot currently remove a column...
Oh yes you can:
ALTER TABLE tbl DROP COLUMN
ALTER TABLE ADD COLUMN
On Thu, Jun 26, 2003 at 12:42:18PM -0400, MT wrote:
Hello,
I have a table with a bunch of records already inserted. When I want to add or
remove fields from the, what I've done is produce an sql file, add the fields to the
create table directive, and add the fields