On Fri, Sep 5, 2014 at 2:04 AM, Craig Ringer <cr...@2ndquadrant.com> wrote:
> On 09/05/2014 12:04 AM, Pavel Stehule wrote:
>>
>> But some missing casts are well - I found lot performance issues based
>> on using wrong data types - integers, dates in text column.
>
> Of course! That's why the default implicit casts were removed, and for
> good reason. I'm only talking about a narrow class of a few specific types.
>
> I think maybe a _few_ types need to be implicitly convertable from text,
> but that's about it.
>
> text -> jsonb
> text -> json
> text -> xml
> text -> hstore
> text -> uuid
> text -> (user defined enum)
>
> ... mainly because otherwise app devs need frustrating workarounds (or
> giving up on the PostgreSQL native types and just using 'text' columns),
> and because in all these cases PostgreSQL will validate the input.

That seems pretty reasonable.  If you do that along with redefining
certain functions like lpad() to take "any" instead of text you'd
eliminate most of the headaches.

merlin


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to