Re: Found a bug in the procedural languages code relating to LIMIT 1

From: <drevil(at)sidereal(dot)kz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Found a bug in the procedural languages code relating to LIMIT 1
Date: 2001-01-12 04:15:20
Message-ID: 20010112041520.2560.qmail@mailhost.sidereal.kz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > CREATE FUNCTION foo(...) RETURNS INT4 AS '
> > SELECT shoesize FROM customers ORDER BY time LIMIT 1
> > ' LANGUAGE 'sql';
> > It gives an error that returning multiple values is not allowed.
>
> In what version of Postgres, pray tell? I can't duplicate that behavior
> in 7.0.3 nor current.

It's 7.0.3. Mail me an example of something which works and I'll try
it out.

> Consider DISTINCT ON. Here's the example given in the SELECT reference
> manual page:

Is that the optimal way to do this? What the man page described is
exactly what I'm trying to do.

Thanks

In response to

Browse pgsql-general by date

  From Date Subject
Next Message drevil 2001-01-12 04:20:59 Re: How to tell if that UPDATE worked?
Previous Message Joseph Shraibman 2001-01-12 04:01:31 Re: Java Classes