agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: The Hermit Hacker <scrappy@hub.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: v7.1 error ... SELECT converted to a COPY?
Date: Wed, 02 May 2001 11:27:02 +0200
Message-ID: <3AEFD2E6.D221F706@tm.ee> (raw)
References: <Pine.BSF.4.33.0104300156310.411-100000@mobile.hub.org>

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



view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: hannu@tm.ee, scrappy@hub.org, tgl@sss.pgh.pa.us
  Subject: Re: v7.1 error ... SELECT converted to a COPY?
  In-Reply-To: <3AEFD2E6.D221F706@tm.ee>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox