type casting varchar to int

Started by Hoosain Madhiover 25 years ago2 messagesgeneral
Jump to latest
#1Hoosain Madhi
MADHIH@vodacom.co.za

Is it possible to type cast from varchar to int? Postgres backend complains
when I try to do this.

Hoosain Madhi
Switching Engineering
VODACOM CORPORATE PARK
Tel : +27 11 653 5030
Fax : +27 11 653 5941

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Hoosain Madhi (#1)
Re: type casting varchar to int

You can make an intermediate step through text
<colume>::text::int

However, it'll fail if there are any values it cannot
turn into an integer (with an elog) which may not
be what you want.

Stephan Szabo
sszabo@bigpanda.com

On Fri, 8 Sep 2000, Hoosain Madhi wrote:

Show quoted text

Is it possible to type cast from varchar to int? Postgres backend complains
when I try to do this.