Re: Cast to integer

From: "A(dot) Kretschmer" <akretschmer(at)despammed(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Cast to integer
Date: 2005-10-05 13:49:55
Message-ID: 20051005134955.GS10593@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am 05.10.2005, um 15:08:33 +0200 mailte Robert Osowiecki folgendes:
> Hello!
>
> 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? And what if I
> create a cast for that: is it possibly dangerous?

test=# select '3.33'::float::int;
int4
------
3
(1 row)

Regards, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Welty, Richard 2005-10-05 13:52:52 Re: License question[VASCL:A1077160A86]
Previous Message Sean Davis 2005-10-05 13:48:49 Re: Cast to integer