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

Поиск
Список
Период
Сортировка
От
Тема Re: Found a bug in the procedural languages code relating to LIMIT 1
Дата
Msg-id 20010112041520.2560.qmail@mailhost.sidereal.kz
обсуждение исходный текст
Ответ на Re: Found a bug in the procedural languages code relating to LIMIT 1  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Lee Joramo
Дата:
Сообщение: COPY error: pqReadData() -- backend closed the channel unexpectedly
Следующее
От: Michael
Дата:
Сообщение: Select NULL value with cursor