pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedERROR: Cannot insert a duplicate key into a unique index
2+ messages / 2 participants
[nested] [flat]
* ERROR: Cannot insert a duplicate key into a unique index
@ 1970-01-01 00:00 Haller Christoph <ch@rodos.fzk.de>
2001-09-12 16:35 ` Re: ERROR: Cannot insert a duplicate key into a unique index Josh Berkus <josh@agliodbs.com>
0 siblings, 1 reply; 2+ messages in thread
From: Haller Christoph @ 1970-01-01 00:00 UTC (permalink / raw)
To: pgsql-sql
[SQL] ERROR: Cannot insert a duplicate key into a unique index
I'm working on a C code application using loads of
insert commands.
It is essential to distinguish between an error
coming from a misformed command or other fatal
reasons and a duplicate key.
In either case, the PQresultStatus() returns
PGRES_FATAL_ERROR
I can check PQresultErrorMessage() for the
error message above, but then I have to rely
on this string never be changed.
This is no good programming style.
Does anybody have another, better idea or is
there at least a header file available, where
all the error messages can be found?
Regards, Christoph
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ERROR: Cannot insert a duplicate key into a unique index
1970-01-01 00:00 ERROR: Cannot insert a duplicate key into a unique index Haller Christoph <ch@rodos.fzk.de>
@ 2001-09-12 16:35 ` Josh Berkus <josh@agliodbs.com>
0 siblings, 0 replies; 2+ messages in thread
From: Josh Berkus @ 2001-09-12 16:35 UTC (permalink / raw)
To: Haller Christoph <ch@rodos.fzk.de>; pgsql-sql
Christoph,
> This is no good programming style.
> Does anybody have another, better idea or is
> there at least a header file available, where
> all the error messages can be found?
Try posting this question to pgsql-hackers instead. I think you'll get
more knowledgable help there.
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-09-12 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1970-01-01 00:00 ERROR: Cannot insert a duplicate key into a unique index Haller Christoph <ch@rodos.fzk.de>
2001-09-12 16:35 ` Josh Berkus <josh@agliodbs.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox