Re: This works in 7.2.1, not in 7.3.2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: This works in 7.2.1, not in 7.3.2
Дата
Msg-id 14276.1057970295@sss.pgh.pa.us
обсуждение исходный текст
Ответ на This works in 7.2.1, not in 7.3.2  ("Frank Millman" <frank@chagford.com>)
Список pgsql-general
"Frank Millman" <frank@chagford.com> writes:
> The following works in 7.2.1 -

> 1. select count(*) from SysUsersCompanies where UserRowId =3D 3 ;
> 2. select substring('NY',(select count(*) from SysUsersCompanies where User=
> RowId =3D 3)+1,1) ;

> The first select returns either 1 or 0
> The second one uses the result in a more complex expression, and returns ei=
> ther 'Y' or 'N'

> In 7.3.2, the first select behaves the same, but the second one returns NUL=
> L.

Try coercing the result of count(*) to integer (it's bigint to start
with).

            regards, tom lane

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

Предыдущее
От: Michael Adler
Дата:
Сообщение: Re: [CYGWIN] pg_restore very slow
Следующее
От: Raymond
Дата:
Сообщение: PL/pgSQL CASE Support