Tom Lane writes:
> I don't actually see any point in having two functions at all. Since
> the trigger is examining the column type internally, it could perfectly
> well do the right thing at runtime depending on column type.
Sorry, brain fart from me. Didn't realise we're talking about a trigger
On Fri, Oct 29, 2010 at 4:12 PM, Tom Lane wrote:
> "Kevin Grittner" writes:
>> Robert Haas wrote:
I think if I had to pick a proposal, I'd say we should disable #2
for the specific case of casting a composite type to something
else.
>
>>> Well, then let's do that. It's not the ex
Merlin Moncure wrote:
> Trying to understand real world cases that this would
> break...would the following now fail w/o explicit cast?
>
> create type x as (a int, b int);
> select f((1,2));
It already does:
test=# create type x as (a int, b int);
CREATE TYPE
test=# select f((1,2));
ERROR:
"Kevin Grittner" writes:
> Merlin Moncure wrote:
>> Trying to understand real world cases that this would
>> break...would the following now fail w/o explicit cast?
>>
>> create type x as (a int, b int);
>> select f((1,2));
> It already does:
I think Merlin probably meant to write "select x((
On Thu, Nov 4, 2010 at 12:14 PM, Tom Lane wrote:
> "Kevin Grittner" writes:
>> Merlin Moncure wrote:
>>> Trying to understand real world cases that this would
>>> break...would the following now fail w/o explicit cast?
>>>
>>> create type x as (a int, b int);
>>> select f((1,2));
>
>> It already
Tom Lane wrote:
> What would be affected is something like
>
> select text((1,2));
>
> which you'd now be forced to write as
>
> select (1,2)::text;
>
> (or you could use CAST notation; but not text(row) or row.text).
Right. As far as I'm aware, there are currently four ways t
Merlin Moncure writes:
> On Thu, Nov 4, 2010 at 12:14 PM, Tom Lane wrote:
>> "Kevin Grittner" writes:
>>> Merlin Moncure wrote:
create type x as (a int, b int);
select f((1,2));
>> I think Merlin probably meant to write "select x((1,2))", but that
>> doesn't work out-of-the-box eithe
Am 04.11.2010 04:55, schrieb Tom Lane:
> I don't actually see any point in having two functions at all. Since
> the trigger is examining the column type internally, it could perfectly
> well do the right thing at runtime depending on column type.
Got the point. Here's another patch, hope my limi
Dirk Heinrichs writes:
> Am 04.11.2010 04:55, schrieb Tom Lane:
>> I don't actually see any point in having two functions at all. Since
>> the trigger is examining the column type internally, it could perfectly
>> well do the right thing at runtime depending on column type.
> Got the point. Here