Re: Cast to integer

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Osowiecki <robson(at)cavern(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cast to integer
Date: 2005-10-05 14:41:20
Message-ID: 18567.1128523280@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Robert Osowiecki <robson(at)cavern(dot)pl> writes:
> Anyone could explain to me, why cast(3.33 to int) works (from float, I
> suppose) but cast('3.33' to int) (from text) does not?

The latter is not really a cast; it's an invocation of the int
datatype's input function.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message L van der Walt 2005-10-05 14:48:33 Re: Securing Postgres
Previous Message L van der Walt 2005-10-05 14:37:38 Re: Securing Postgres