pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedcould not find pathkey item to sort
2+ messages / 2 participants
[nested] [flat]
* could not find pathkey item to sort
@ 2006-12-07 22:16 Phillip Smith <phillips@weatherbeeta.com.au>
2006-12-07 23:42 ` Re: could not find pathkey item to sort Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Phillip Smith @ 2006-12-07 22:16 UTC (permalink / raw)
To: pgsql-sql
Hi All,
Since upgrading to PG 8.2, I'm getting this error on a nightly (bash) script
that calls psql (it's purpose is to find stock codes that share an EAN
Barcode with another code - it used to work, now doesn't):
ERROR: could not find pathkey item to sort
SQL state: XX000
The error is because of the ORDER BY clause of this query:
SELECT code, description, ean
FROM $TMPTABLE
WHERE ean <> ''
AND ean IN (SELECT ean FROM $TMPTABLE GROUP BY ean HAVING count(ean) >
1)
ORDER BY ean
The $TMPTABLE is created as per:
CREATE TEMP TABLE $TMPTABLE
(
code varchar(6),
description varchar(38),
grp varchar(4),
brand text,
style text,
supplier varchar(6),
supplier_code text,
wholesale numeric(10,2),
retail numeric(10,2),
ean varchar(13)
)
WITHOUT OIDS;
-- Import the file from WB Database
COPY $TMPTABLE FROM '$TMPFILE';
I've tried creating an index and doing a reindex on the temp table because
the select to no avail.
Any help would be great - I've "fixed" it at the moment by commenting the
ORDER BY clause, but it would be nice to have it sorted properly, and also
in case it happens in any other tables.
Thanks,
-p
Phillip Smith
IT Coordinator
Weatherbeeta P/L
8 Moncrief Rd
Nunawading, VIC, 3131
AUSTRALIA
E. phillips@weatherbeeta.com.au
*******************Confidentiality and Privilege Notice*******************
The material contained in this message is privileged and confidential to
the addressee. If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.
Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: could not find pathkey item to sort
2006-12-07 22:16 could not find pathkey item to sort Phillip Smith <phillips@weatherbeeta.com.au>
@ 2006-12-07 23:42 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2006-12-07 23:42 UTC (permalink / raw)
To: phillip.smith@weatherbeeta.com.au; +Cc: pgsql-sql
"Phillip Smith" <phillips@weatherbeeta.com.au> writes:
> Since upgrading to PG 8.2, I'm getting this error on a nightly (bash)
> script
> ERROR: could not find pathkey item to sort
I think this is a variant manifestation of the same bug already reported
here:
http://archives.postgresql.org/pgsql-hackers/2006-12/msg00284.php
and fixed here:
http://archives.postgresql.org/pgsql-committers/2006-12/msg00056.php
Leastwise, it went away for me after applying that patch ...
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-12-07 23:42 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-07 22:16 could not find pathkey item to sort Phillip Smith <phillips@weatherbeeta.com.au>
2006-12-07 23:42 ` Tom Lane <tgl@sss.pgh.pa.us>
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