Postgres PL SQL bug?

From: Shaun Clements <ShaunC(at)relyant(dot)co(dot)za>
To: pgsql-general(at)postgresql(dot)org
Subject: Postgres PL SQL bug?
Date: 2005-03-31 14:29:40
Message-ID: 100F78F2B203444BB161BBA7077FF6131CD9CC@srldbexc003.relyant.co.za
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2005-03-31 14:41:35 Re: Debugging deadlocks
Previous Message Qingqing Zhou 2005-03-31 14:02:30 Re: Postgres Processing Help !!!!