Re: [GENERAL] A mistake generates strange result

From: Postgres DBA <postgres(at)nest(dot)bistbn(dot)com>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [GENERAL] A mistake generates strange result
Date: 1999-02-10 13:31:01
Message-ID: Pine.BSF.4.02.9902101527160.3250-100000@nest.bistbn.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Unfortunately, that is true, at least for Postgres 6.4.0:
template1=> select text('12345678'::float8);

text
-----------------------------
Tue May 23 00:21:18 2000 EEST
(1 row)

Please, guys, take care of this small bug:-)
Aleksey

On 9 Feb 1999, [ISO-8859-1] Stphane Dupille wrote:

>
> Hi !
>
> "Ricardo J.C.Coelho" <pulsar(at)truenet-ce(dot)com(dot)br> writes:
> > Just for PgSQL's development group think about....
> > I made a mistake typing a query that generates a strange result
> > (Very strange).
>
> > The query: select text('12345678'::float8);
> > It returns a date in datetime format !!!!!!
>
> I didn't found any function of name "text" that converts
> float8 to text. So I think Postgres made an implicit cast of the data
> to datatime. So: String->Float8->DateTime->Text. Stranger : I didn't
> found any function to cinvert float to text !
>
> > If you use: select ('12345678'::float8)::text; everything runs well.
>
> Here, you made an explicit cast, without the use of any
> function. So your data is casted well.
>
> Hope this helps !
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Colin Price (EML) 1999-02-10 14:34:30 subscribe pgsql-general
Previous Message Silvio Emanuel Barbosa de Macedo 1999-02-10 10:58:58 Backend crash

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-02-10 15:01:00 Re: [HACKERS] PostgreSQL and Solaris 7?
Previous Message Zeugswetter Andreas IZ5 1999-02-10 10:07:26 AW: [HACKERS] NEXTSTEP porting problems