Re: Singleton range constructors versus functional coercion notation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Singleton range constructors versus functional coercion notation
Date: 2011-11-22 18:01:23
Message-ID: 5517.1321984883@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> It's a little strange that we allow people to define functions with one
> argument and the same name as a type if such functions are confusing.

As long as your mental model is that such a function is a cast,
everything is fine. The trouble with the range constructors is that
they aren't really casts, as shown by the fact that when you read
textrange('foo')
you expect 'foo' to be text and not textrange.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavan Deolasee 2011-11-22 18:04:48 Re: testing ProcArrayLock patches
Previous Message Robert Haas 2011-11-22 17:35:01 Re: Storing hot members of PGPROC out of the band