sneaking by PGSQL's referential integrity (sort of)
От | joel w. reed |
---|---|
Тема | sneaking by PGSQL's referential integrity (sort of) |
Дата | |
Msg-id | 20001106163621.B10462@support.ddiworld.com обсуждение исходный текст |
Список | pgsql-general |
the following behavior seems like a bug. in postgresql-ODBC, an INSERT which fails because of a referential integrity problem silently fails without returning an error codes. however, running the same INSERT at the command line with psql properly fails. i've searched the source for some time trying to figure out the difference between these two, but thus far to no avail. silently failing in the ODBC case makes it hard to debug & leaves you scratching your head for a while. could anyone point me to the code i should be looking at to change this behavior? could this become an accepted patch? i'm not on this list. please cc me! jr the odbc trace file shows the following ... it's NOT a select statement: stmt=134828520 send_query(): conn=134575824, query='insert into lnk_lm_target_rater (col_id_survey,col_id_target,col_id_rater,col_id_relation,col_status,col_delivery_method,col_comments)values (1011,527,527,1,0,0,'')' send_query: done sending query send_query: got id = 'Z' read 161, global_socket_buffersize=4096 send_query: got id = 'P' send_query: got id = 'C' send_query: ok - 'C' - INSERT 583616 1 in QR_Constructor exit QR_Constructor send_query: setting cmdbuffer = 'INSERT 583616 1' read 1, global_socket_buffersize=4096 read 3, global_socket_buffersize=4096 send_query: returning res = 134696760 send_query(): conn=134575824, query='COMMIT' send_query: done sending query send_query: got id = 'Z' read 9, global_socket_buffersize=4096 send_query: got id = 'C' send_query: ok - 'C' - COMMIT in QR_Constructor exit QR_Constructor send_query: setting cmdbuffer = 'COMMIT' read 3, global_socket_buffersize=4096 send_query: returning res = 134696896 -- ------------------------------------------------------------------------ Joel W. Reed 412-257-3881 --------------All the simple programs have been written.---------------- mylog_jreed13603.log
В списке pgsql-general по дате отправления: