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 just run the statements contained in the dump on the new database. 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? 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. Am loosing my mind in this heat but, you should be able to insert just half the fields of a table record if the datastructure would allow it? Wouldnt you? I feel like a such a noob :( Please advise.. -- L.E.Thorsplass ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend