I found error in my DB - sequence for column id had value less "SELECT
max ( id ) FROM table0" (sequence throwed unique violation exception
too). I set valid value for sequence and issue was resolved.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
PostgreSQL version:
PostgreSQL 9.2.2 on x86_64-unknown-linux-gnu, compiled by gcc
(Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit
OS:
Ubuntu 12.10
Linux machine0 3.5.0-26-generic #42-Ubuntu SMP Fri Mar 8 23:18:20 UTC
2013 x86_64 x86_64 x86_64 GNU/Linux
As for my case, I use this function as fun
On Fri, Apr 12, 2013 at 8:44 AM, whiplash wrote:
>
> CREATE UNIQUE INDEX idx_table0_unique
> ON table0 ( field0, coalesce ( field1, 'INDEX_COLUMN_NULL' ) );
>
> I created function for insert only unique record (part of code):
>
> BEGIN
> INSERT INTO table0 ( field0, field1 ) VALUES ( p_field0
whiplash wrote:
> sometimes I getting false unique violation
How do you know that they are false?
What version of PostgreSQL is this?
Can you create a small self-contained test case that demonstrates
the issue? (The snippets you provided probably excluded the cause
of the problem.)
http://wi
Hello.
This is simple example for describe my problem.
I created a table:
CREATE TABLE table0
(
id serial NOT NULL,
field0 integer,
field1 text
);
I created an unique index for this table:
CREATE UNIQUE INDEX idx_table0_unique
ON table0 ( field0, coalesce ( field1, 'INDEX_COLUMN_N