Skip site navigation (1) Skip section navigation (2)

Re: Possible bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>,Ilir Gashi <I(dot)Gashi(at)city(dot)ac(dot)uk>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Possible bug?
Date: 2004-07-02 14:27:35
Message-ID: 14233.1088778455@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Am Donnerstag, 1. Juli 2004 23:10 schrieb Tom Lane:
>> Right.  The reason PG doesn't error is that we have an implicit cast
>> from integer to text.  I've opined before that we should mark most
>> cross-type-category casts as explicit-only ... they are just too prone
>> to give unexpected answers, as in this case.

> It seems we're just opining in circles.  Why not do it?  Is anyone objecting?

IIRC there were objections the last time it was seriously proposed,
basically of the form "but that will break my application which relies
on writing so-and-so without a cast".  We did get as far as removing all
the implicit cross-category coercions except these casts to text:

 bigint                      | text
 smallint                    | text
 integer                     | text
 real                        | text
 double precision            | text
 numeric                     | text
 oid                         | text
 date                        | text
 time without time zone      | text
 time with time zone         | text
 timestamp without time zone | text
 timestamp with time zone    | text
 interval                    | text

but these seem to have a constituency :-(

			regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2004-07-02 14:28:46
Subject: Re: timestamp arithmetic (a possible bug?)
Previous:From: Stephan SzaboDate: 2004-07-02 14:12:12
Subject: Re: timestamp arithmetic (a possible bug?)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group