Re: PostgreSQL: SQLSetPos fails with SetPos update return error.

Поиск
Список
Период
Сортировка
От Tsunakawa, Takayuki
Тема Re: PostgreSQL: SQLSetPos fails with SetPos update return error.
Дата
Msg-id 0A3221C70F24FB45833433255569204D1F57A6CF@G01JPEXMBYT05
обсуждение исходный текст
Ответ на Re: PostgreSQL: SQLSetPos fails with SetPos update return error.  ("Venkatesan, Sekhar" <sekhar.venkatesan@emc.com>)
Ответы Re: PostgreSQL: SQLSetPos fails with SetPos update return error.  ("Venkatesan, Sekhar" <sekhar.venkatesan@emc.com>)
Список pgsql-odbc

From: Venkatesan, Sekhar [mailto:sekhar.venkatesan@emc.com]
 When partition is enabled in my application and I change the partitioning key in the table to save the new data into another partition, I get error like this:

 

ERROR: new row for relation "testpart_s" violates check constraint " p1_testpart12_s"

 

I enabled constraint_exclusion in postgresql.conf.

I followed the document you shared to enable row movement across partitions by writing triggers on partition tables. It works up to a point but not confident it will work for all use-cases.

 

 

Did this error begin to happen with the unreleased driver, or already happen with the officially released driver?

 

SQLSetPos(SQL_UPDATE) issues an UPDATE statement.  Could you identify the statement causing the error by logging the statements, i.e. adding log_statement = ‘all’ in postgresql.conf?  Does the statement seem to be wroing when you consider the check constraint name, i.e. is the target table correct?

 

Are you sure your trigger specifies the appropriate table for the new key value?

 

Regards

Takayuki Tsunakawa

 

 

 

 

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Venkatesan, Sekhar"
Дата:
Сообщение: Re: PostgreSQL: SQLSetPos fails with SetPos update return error.
Следующее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: [patch] fix buffer overrun in logging, and code cleanup