Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] "internal error" triggered by EXISTS()

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: David Gould <dg(at)illustra(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] "internal error" triggered by EXISTS()
Date: 1998-07-15 02:41:09
Message-ID: 35AC16C5.C0B9C32F@krs.ru (view raw or flat)
Thread:
Lists: pgsql-hackers
David Gould wrote:
> 
> >
> > I tried the following to find out whether a table has any records
> > with field1 < X (for a constant X):
> >
> > tgl=> SELECT EXISTS(SELECT * FROM table WHERE field1 < X);
> > ERROR:  internal error: do not know how to transform targetlist
> 
> Should have given a syntax error probably. But you might try:
> 
> select 1 where exists (select...);
> 
> Should be faster if and only if we are doing the existential query
> optimization trick (stop on the first qualifying row).

We do.

Vadim

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-07-15 02:45:30
Subject: Re: [HACKERS] "internal error" triggered by EXISTS()
Previous:From: Vadim MikheevDate: 1998-07-15 02:29:31
Subject: Re: [HACKERS] SEQUENCES and COPY FROM

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group