Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-31 Thread Tom Lane
Steve Atkins st...@blighty.com writes: On Mar 30, 2010, at 4:23 PM, Wang, Mary Y wrote: Now, the source code doesn't work any more. Here is the SQL - INSERT INTO activity_log (day,hour,group_id,browser,ver,platform,time,page,type,user_id) VALUES

Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-31 Thread Raymond O'Donnell
On 31/03/2010 15:09, Tom Lane wrote: Mary's the one who's trying to port forward from some neolithic PG version. Lots of pain, but hopefully lots of gain too! :-) Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list

[GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-30 Thread Wang, Mary Y
Hi, I'm confused. I'm in the process of migrating to 8.3.8. I used pg_dump and pg_restore command for migration. Here is my problem. Here is my old table prior migration: \d activity_log Table activity_log Attribute | Type | Modifier

Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-30 Thread Adrian Klaver
On Tuesday 30 March 2010 4:23:39 pm Wang, Mary Y wrote: Hi, I'm confused. I'm in the process of migrating to 8.3.8. I used pg_dump and pg_restore command for migration. Here is my problem. Here is my old table prior migration: \d activity_log Table activity_log

Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-30 Thread Wang, Mary Y
:32 PM To: pgsql-general@postgresql.org Cc: Wang, Mary Y Subject: Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused On Tuesday 30 March 2010 4:23:39 pm Wang, Mary Y wrote: Hi, I'm confused. I'm in the process of migrating to 8.3.8. I used pg_dump and pg_restore

Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-30 Thread Adrian Klaver
On Tuesday 30 March 2010 4:49:42 pm Wang, Mary Y wrote: Ok. Thanks. In that case, I'm going to have a lot of type casting issues. What's the best way to fix all tables? Write a script to alter those tables? Any suggestions? Mary Wang This might help:

Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-30 Thread Jeff Davis
On Tue, 2010-03-30 at 16:32 -0700, Adrian Klaver wrote: 8.3 tightened up type casting. You cannot INSERT a '0' without casting it to an integer i.e '0'::integer. I don't think that's accurate: postgres=# select version(); version

Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-30 Thread Steve Atkins
On Mar 30, 2010, at 4:23 PM, Wang, Mary Y wrote: Hi, I'm confused. I'm in the process of migrating to 8.3.8. I used pg_dump and pg_restore command for migration. Here is my problem. Here is my old table prior migration: \d activity_log Table activity_log Attribute

Re: [GENERAL] Migration - not null default '0' - not null default 0 - confused

2010-03-30 Thread Adrian Klaver
On Tuesday 30 March 2010 4:59:30 pm Jeff Davis wrote: On Tue, 2010-03-30 at 16:32 -0700, Adrian Klaver wrote: 8.3 tightened up type casting. You cannot INSERT a '0' without casting it to an integer i.e '0'::integer. I don't think that's accurate: postgres=# select version(); version