Error: could not find pathkey item to sort

From: Theerasak Maneeneim <theerasak(at)thns(dot)co(dot)th>
To: pgsql-sql(at)postgresql(dot)org
Subject: Error: could not find pathkey item to sort
Date: 2008-04-22 01:09:09
Message-ID: 480D3AB5.5010900@thns.co.th
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Everyone,

I had some problem with postgresql 8.3.1. I had got an error
message, ERROR: could not find pathkey item to sort, when
I use this query statement:

SELECT INTO wk_fcstrec_dt DISTINCT MAX(fcstrec_dt)
FROM a_cusfcst
WHERE
cscd = '2203'
AND cs_partno = '35732SSA'
AND delipnt_no = '001'
AND plantcd_no = '003'
AND locatto = trim(both FROM 'SS')
AND fcstrec_dt < '20080910'
AND latest_flg = 'N';

I have not ever seen the error in version 8.1 and 8.2. Now, I
have already revised my program by removed the word "DISTINCT" but I
want to know what is cause of this error. Could you please to explain to me?

Thank you very much.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Peters 2008-04-22 09:47:27 Problems with function while migrating from Windows to Linux
Previous Message Tom Lane 2008-04-21 14:23:06 Re: Error: could not find pathkey item to sort