Re: [INTERFACES] [pgaccess-users] RE:

From: Rod Taylor <rbt(at)zort(dot)ca>
To: Bradley Baetz <bbaetz(at)student(dot)usyd(dot)edu(dot)au>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [INTERFACES] [pgaccess-users] RE:
Date: 2002-07-10 23:56:01
Message-ID: 1026345366.62546.42.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2002-07-10 at 19:44, Bradley Baetz wrote:
> <delurk - reading from the archives, so please cc me on responses>
>
> Note that before bugzilla really supports postgresql, we (ie the bugzilla
> team) are going to need DROP COLUMN support, as well as support for
> changing a field's type. This is because thats how upgrades are done, when
> new features change the bz schema.

Agreed it would be nice, but how come upgrades cannot be done with temp
tables -- especially since the bugzilla database is simple (no foreign
key constraints, etc.) If you're persisting with using ENUM(), a common
upgrade script won't work anyway.

-- Create a table
create table a (col1 varchar(4));

-- Add some data
insert into table a values (1);
insert into table a values (2);

-- Lets change the datatype of col1
begin;
create temp table a_tmp as select * from a;
drop table a;
create table a (col1 integer);
insert into a (col1) select cast(col1 as integer) from a_tmp;
commit;

You've just changed the datatype from a varchar to integer. With the
transaction support, you're guaranteed it won't be left mid way through
either.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bradley Baetz 2002-07-11 00:08:47 Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org
Previous Message Bradley Baetz 2002-07-10 23:44:01 Re: [INTERFACES] [pgaccess-users] RE: bugzilla.pgaccess.org