|
Home > Archive > PostgreSQL Discussion > March 2005 > Postgres PL SQL bug?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Postgres PL SQL bug?
|
|
| Shaun Clements 2005-03-31, 8:03 pm |
| Hi All
Im hoping someone has an answer for this mystery.
I have a stored procedure, which queries a table, of about 400-000 records,
into a RECORD, ordered by three columns.
I am using a conditional INSERT, UPDATE command, based on evaluating the
last record.column, against the new record.column, to ascertain whether it
requires, an UPDATE or INSERT.
The problem is the records are not ORDERED properly into the RECORD, and
when looping through it,it is trying to INSERT somewhere down the line, and
is returning an error, saying it cant INSERT a duplicate key into unique..
etc.
Any suggestions, the postgres version is 7.3
Thanks in advance.
Kind Regards,
Shaun Clements
| |
| Richard Huxton 2005-03-31, 8:03 pm |
| Shaun Clements wrote:
>
> The problem is the records are not ORDERED properly into the RECORD, and
> when looping through it,it is trying to INSERT somewhere down the line, and
> is returning an error, saying it cant INSERT a duplicate key into unique..
> etc.
What do you mean by not ordered properly? How have you tried to order
them and how have they actually been ordered?
--
Richard Huxton
Archonet Ltd
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql
.org
|
|
|
|
|