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

Re: Implicit casts to text

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Implicit casts to text
Date: 2007-04-02 15:40:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Am Montag, 2. April 2007 09:17 schrieb Tom Lane:
> The scheme that was in the back of my mind was to do this at the same
> time as providing a general facility for casting *every* type to and
> from text, by means of their I/O functions if no specialized cast is
> provided in pg_cast.  This would improve functionality, thus providing
> a salve to the annoyance of users whose code the restriction breaks:
> we can certainly argue that it wouldn't do for all those automatically
> created casts to be implicit.  At the same time it'd let us eliminate
> redundant text-to/from-foo code that's currently in place for some but
> not all datatypes.

That's the first time I hear of such a scheme.  Anyway, the point of this 
exercise is to reduce misbehavior by explicit casting.  I don't see how 
implicitly adding more casting paths helps that or is even related to that.

Even if we had the automatic cast facility that you describe, and I find it 
highly suspicious, such casts could at most be of the explicit category, so 
how would that help users who currently rely on the implicit ones?

Peter Eisentraut

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2007-04-02 16:20:35
Subject: Re: One-time plans
Previous:From: Martijn van OosterhoutDate: 2007-04-02 14:54:14
Subject: Re: Statistics on views (execute a plan from within analyze)

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