Heikki Linnakangas escribió: > I do understand the point, though - it's much easier to edit and debug > long statements when the value is close to the column name. I find that > the INSERT .. SELECT makes that a lot nicer: > > INSERT INTO t > (col1,col2,col3,col4,col5,col6,col7,col8,col9,col10,col11,col12,col13,col14,col15) > SELECT 'val1' AS col1, > 'val2' AS col2,
This example lists the columns twice, which is lame (you have to keep both in sync) -- and if you take the first list out it works, but the values can end up in the wrong places if they are not in the same order as the columns in the table. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers