v7.2.2 When an insert fails because its in violation of an index (duplicate), I get a return code 7 (PGSQL_FATAL_ERROR) in my php 4.2.3 interface. Its not really a fatal error, is it? Shouldn't it be reported as a NONFATAL_ERROR ? I have a "dumb" synchronizing task, that attempts to import a daily cumulative batch of records, relying on a specific table index to reject the records that were successfully imported from previous runs. The "index rejection" method takes only 25 seconds for my batch of 30,000 records, while the "select to find if non-existing then perform the insert" takes 25 minutes. Is there a better way? -- TJ
tj <tj@getlostspammer.com> writes:
> Its not really a fatal error, is it? Shouldn't it be reported as a
> NONFATAL_ERROR ?
It's "fatal" to the particular query that was executing.
PGRES_NONFATAL_ERROR is only used for notice messages. These constant
names are perhaps rather poorly chosen, but we can't change them now
without incurring an unreasonable amount of confusion and backwards
compatibility problems ...
regards, tom lane
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера