Re: [PERFORM] typoed column name, but postgres didn't grump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [PERFORM] typoed column name, but postgres didn't grump
Date: 2010-11-04 16:56:20
Message-ID: 11057.1288889780@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-performance

Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> On Thu, Nov 4, 2010 at 12:14 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
>>> Merlin Moncure <mmoncure(at)gmail(dot)com> 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 either. What would be affected is
>> something like

> Actually I didn't -- I left out that there was a function f taking x.

Ah. No, that would still work after the change. The case that I'm
proposing to break is using function-ish notation to invoke a cast
from a composite type to some other type whose name you use as if it
were a function. Even there, if you've created such a cast following
the usual convention of naming the cast function after the target type,
it'll still act the same. It's just the built-in I/O-based casts that
will stop working this way (for lack of a matching underlying function).

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dirk Heinrichs 2010-11-04 18:40:53 Re: BUG #5740: contrib/spi/moddatetime.c doesn't work with timezones.
Previous Message Kevin Grittner 2010-11-04 16:49:28 Re: [PERFORM] typoed column name, but postgres didn't grump

Browse pgsql-performance by date

  From Date Subject
Next Message Nick Matheson 2010-11-04 19:24:59 Re: Simple (hopefully) throughput question?
Previous Message Kevin Grittner 2010-11-04 16:49:28 Re: [PERFORM] typoed column name, but postgres didn't grump