Re: Retype - Mailing list pgsql-sql

From Richard Huxton
Subject Re: Retype
Date
Msg-id 200306100820.44251.dev@archonet.com
Whole thread Raw
In response to Retype  (Rado Petrik <r.p@szm.sk>)
List pgsql-sql
On Monday 09 Jun 2003 10:24 am, Rado Petrik wrote:
> I have query  " SELECT id_user FROM user WHERE (freg_u & 2 ) > 0 ".
>
> freg_u is type smallint.

> How I retype freg_u to interger ?
... WHERE (freg_u::integer & 2) ...

Or you could use the more standard but long-winded CAST function

--  Richard Huxton


pgsql-sql by date:

Previous
From: Alexey Dashevsky
Date:
Subject: left join in cursor
Next
From: Achilleus Mantzios
Date:
Subject: Re: how to determine array size