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

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: v7.1 error ... SELECT converted to a COPY?
Date: 2001-05-02 09:27:02
Message-ID: 3AEFD2E6.D221F706@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The Hermit Hacker wrote:
>
> On Mon, 30 Apr 2001, Tom Lane wrote:
>
> > The Hermit Hacker <scrappy(at)hub(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2001-05-02 09:58:38 Re: Thanks, naming conventions, and count()
Previous Message The Hermit Hacker 2001-05-02 07:03:42 Re: Re: No Posts?