Re: Problem using LIMIT 1 when only 1 record exists. - Mailing list pgsql-bugs

From Neil Conway
Subject Re: Problem using LIMIT 1 when only 1 record exists.
Date
Msg-id 873cc8kvpb.fsf@mailbox.samurai.com
Whole thread Raw
In response to Problem using LIMIT 1 when only 1 record exists.  ("Steve Thames" <steve@softlife.com>)
Responses Re: Problem using LIMIT 1 when only 1 record exists.
List pgsql-bugs
"Steve Thames" <steve@softlife.com> writes:
> The SQL command:
> SELECT last FROM table WHERE symbol='Symbol' AND expmoyr='Mmm-YY' ORDER BY
> qdate DESC LIMIT 1;
>
> This query works fine when there is more than one record meeting the
> criteria.  When there is only 1, the query locks and no result is
> returned.

I'm skeptical that LIMIT is broken. Can you provide a reproducible
example?

Also, what version of PostgreSQL is this?

-Neil

pgsql-bugs by date:

Previous
From: Neil Conway
Date:
Subject: Re: COPY alloc problem in 7.4
Next
From: Bruce Momjian
Date:
Subject: Re: [ADMIN] Misplaced modifier in Postgresql license