Re: This works in 7.2.1, not in 7.3.2 - Mailing list pgsql-general

From Tom Lane
Subject Re: This works in 7.2.1, not in 7.3.2
Date
Msg-id 14276.1057970295@sss.pgh.pa.us
Whole thread Raw
In response to This works in 7.2.1, not in 7.3.2  ("Frank Millman" <frank@chagford.com>)
List 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 by date:

Previous
From: Michael Adler
Date:
Subject: Re: [CYGWIN] pg_restore very slow
Next
From: Raymond
Date:
Subject: PL/pgSQL CASE Support