Re: [HACKERS] Allowing implicit 'text' -> xml|json|jsonb

2014-09-07 Thread Craig Ringer
On 09/07/2014 02:24 AM, Tom Lane wrote: >>> >> The problem here seems to be only related to mistyped parameters. Can >>> >> we contain the damage to that part only somehow? Or make this optional >>> >> (defaulting to off, I hope)? >> > I'd love to make it affect only parameters, actually, for v3

Re: [HACKERS] Allowing implicit 'text' -> xml|json|jsonb

2014-09-06 Thread Tom Lane
Craig Ringer writes: > On 09/05/2014 05:04 PM, Marko Tiikkaja wrote: >> I really don't like the idea of relaxing casts. And I really object to >> the notion of casting from test to date being "obviously right". > Gah. It's obviously right to *reject* implicit conversions like > text->date. I spe

Re: [HACKERS] Allowing implicit 'text' -> xml|json|jsonb (was: PL/pgSQL 2)

2014-09-05 Thread Merlin Moncure
On Fri, Sep 5, 2014 at 2:04 AM, Craig Ringer 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 r

Re: [HACKERS] Allowing implicit 'text' -> xml|json|jsonb

2014-09-05 Thread Marko Tiikkaja
On 9/5/14 11:08 AM, Craig Ringer wrote: On 09/05/2014 05:04 PM, Marko Tiikkaja wrote: I really don't like the idea of relaxing casts. And I really object to the notion of casting from test to date being "obviously right". Gah. It's obviously right to *reject* implicit conversions like text->

Re: [HACKERS] Allowing implicit 'text' -> xml|json|jsonb

2014-09-05 Thread Craig Ringer
On 09/05/2014 05:04 PM, Marko Tiikkaja wrote: > > I really don't like the idea of relaxing casts. And I really object to > the notion of casting from test to date being "obviously right". Gah. It's obviously right to *reject* implicit conversions like text->date. I specifically do _not_ want to

Re: [HACKERS] Allowing implicit 'text' -> xml|json|jsonb

2014-09-05 Thread Marko Tiikkaja
On 9/5/14 9:04 AM, Craig Ringer wrote: It's easy to object to this on type-purist grounds, but from a pragmatic real-users point of view what we currently do is outright painful, and unless we can go and fix every language binding, every query generator, every ORM, etc to handle things just how P

Re: [HACKERS] Allowing implicit 'text' -> xml|json|jsonb (was: PL/pgSQL 2)

2014-09-05 Thread Craig Ringer
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