Re: Cast to integer - Mailing list pgsql-general

From Tom Lane
Subject Re: Cast to integer
Date
Msg-id 18567.1128523280@sss.pgh.pa.us
Whole thread Raw
In response to Cast to integer  (Robert Osowiecki <robson@cavern.pl>)
List pgsql-general
Robert Osowiecki <robson@cavern.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

pgsql-general by date:

Previous
From: L van der Walt
Date:
Subject: Re: Securing Postgres
Next
From: Richard Huxton
Date:
Subject: Re: Securing Postgres