v7.1 error ... SELECT converted to a COPY?

Started by The Hermit Hackerover 24 years ago4 messages
#1The Hermit Hacker
scrappy@hub.org

Okay, maybe this query isn't quite as simple as I think it is, but does
this raise any flags for anyone? How did I get into a COPY? It appears
re-creatable, as I've done it twice so far ...

eceb=# select e.idnumber,e.password from egi e, auth_info a where e.idnumber != a.idnumber;
Backend sent D message without prior T
Backend sent D message without prior T
Backend sent D message without prior T
Backend sent D message without prior T
Backend sent D message without prior T
Backend sent D message without prior T
Backend sent D message without prior T
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.

\.

Unknown protocol character 'J' read from backend. (The protocol character is the first character the backend sends in response to a query it receives).
PQendcopy: resetting connection

Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: The Hermit Hacker (#1)
Re: v7.1 error ... SELECT converted to a COPY?

The Hermit Hacker <scrappy@hub.org> writes:

Okay, maybe this query isn't quite as simple as I think it is, but does
this raise any flags for anyone? How did I get into a COPY? It appears
re-creatable, as I've done it twice so far ...

eceb=# select e.idnumber,e.password from egi e, auth_info a where e.idnumber != a.idnumber;
Backend sent D message without prior T
Backend sent D message without prior T

At a guess, you're running out of memory on the client side for the
SELECT results (did you really want a not-equal rather than equal
constraint there!?) --- libpq tends not to cope with this too
gracefully. Someone oughta fix that...

regards, tom lane

#3The Hermit Hacker
scrappy@hub.org
In reply to: Tom Lane (#2)
Re: v7.1 error ... SELECT converted to a COPY?

On Mon, 30 Apr 2001, Tom Lane wrote:

The Hermit Hacker <scrappy@hub.org> writes:

Okay, maybe this query isn't quite as simple as I think it is, but does
this raise any flags for anyone? How did I get into a COPY? It appears
re-creatable, as I've done it twice so far ...

eceb=# select e.idnumber,e.password from egi e, auth_info a where e.idnumber != a.idnumber;
Backend sent D message without prior T
Backend sent D message without prior T

At a guess, you're running out of memory on the client side for the
SELECT results (did you really want a not-equal rather than equal
constraint there!?)

Yup, want to figure out which ones are in the egi table that I hadn't
transfer'd over yet ... tried it with a NOT IN ( SELECT ... ) combination,
but an explain of that showed two sequential searches on the tables, so am
working on fixing that ...

#4Hannu Krosing
hannu@tm.ee
In reply to: The Hermit Hacker (#3)
Re: v7.1 error ... SELECT converted to a COPY?

The Hermit Hacker wrote:

On Mon, 30 Apr 2001, Tom Lane wrote:

The Hermit Hacker <scrappy@hub.org> writes:

Okay, maybe this query isn't quite as simple as I think it is, but does
this raise any flags for anyone? How did I get into a COPY? It appears
re-creatable, as I've done it twice so far ...

eceb=# select e.idnumber,e.password from egi e, auth_info a where e.idnumber != a.idnumber;
Backend sent D message without prior T
Backend sent D message without prior T

At a guess, you're running out of memory on the client side for the
SELECT results (did you really want a not-equal rather than equal
constraint there!?)

Yup, want to figure out which ones are in the egi table that I hadn't
transfer'd over yet ... tried it with a NOT IN ( SELECT ... ) combination,
but an explain of that showed two sequential searches on the tables,

did you do it as

select e.idnumber,e.password from egi e
where e.idnumber not in (select idnumber from auth_info a where
e.idnumber = a.idnumber)
;

to smarten up the optimizer about using a join ?

I guess that it can be done using outer joins and testing the "outer2
part for IS NULL in 7.1

-------------------
Hannu