Hi, I've solved this problem for me (Perl). I have a module DBAPI and write a function InsertIntoTable($table_name, $hash_with_values, $data_base_handler). I send the parms to the function in the hash (key1 => value1, key2 => value2 ...) and in the function I compose the insert and execute it. INSERT INTO $table_name (key1, key2, key3) VALUES (value1, value2, value3); So I suggest you write such function and solve most of your problems:-) Regards, Kaloyan Iliev Clodoaldo wrote: 2008/2/29, Martijn van Oosterhout <kleptog@xxxxxxxxx>:On Fri, Feb 29, 2008 at 01:17:20PM -0300, Clodoaldo wrote: > When inserting into a table and there are many columns to be inserted > it is hard to synchronize columns to values: <snip> > Is there some reason for the insert syntax to be the way it is in > instead of the much easier to get it right Update syntax?: Because it's what the SQL standard says. If you don't like it I suggest you take it up with them... But it's a little late to change now I think.I know about the standards and I'm not blaming postgresql. I just want to know if it is worth to bring the the matter to some responsible group. Regards, Clodoaldo Pinto Neto ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |