Fwd: [SQL] Inserts with incomplete rows... NOT NULL constraints

2004-08-11 Thread Lars Erik Thorsplass
Sorry about that, forgot to send to the list. -- Forwarded message -- From: Lars Erik Thorsplass <[EMAIL PROTECTED]> Date: Wed, 11 Aug 2004 22:18:24 +0200 Subject: Re: [SQL] Inserts with incomplete rows... NOT NULL constraints To: Peter Eisentraut <[EMAIL PROTECTE

Re: [SQL] Inserts with incomplete rows... NOT NULL constraints

2004-08-11 Thread Richard Huxton
Lars Erik Thorsplass wrote: The problem am now facing is that postgres will try to insert a NULL value for fields not specified in the insert query and that are defined as NOT NULL in the table structure. Is this the correct behaviour? Actually, what it's doing is inserting the DEFAULT value for th

Re: [SQL] Inserts with incomplete rows... NOT NULL constraints

2004-08-11 Thread Peter Eisentraut
Am Mittwoch, 11. August 2004 14:35 schrieb Lars Erik Thorsplass: > I would expect NULL fields not specified in the insert to get NULL > inserted automatically. But that fields which are NOT NULL in the > table structure gets inserted a NULL value too seems odd. More accurately, the default value i

[SQL] Inserts with incomplete rows... NOT NULL constraints

2004-08-11 Thread Lars Erik Thorsplass
Am trying to migrate some old data to a new database schema. I have dumped the old data as SQL statements. The new datastructure just contains some added fields to a few tables. My plan was to just create a new database with the new structure, dump the content only as SQL insert statements. And ju