Skip site navigation (1) Skip section navigation (2)

Re: function_name.parameter_name

From: Darren Duncan <darren(at)darrenduncan(dot)net>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: function_name.parameter_name
Date: 2010-09-08 22:29:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Alvaro Herrera wrote:
> Excerpts from Darren Duncan's message of miƩ sep 08 17:41:40 -0400 2010:
>> For example, if it wouldn't conflict with anything, one could use the "|" symbol 
>> (mnemonic is that means "alternation" in regular expressions) like this:
>>    CREATE FUNCTION func_very_very_very_very_long_name|short_name() ...
> If you can name the function short_name, why not use just that in the
> first place?

More realistic examples would be either of:

1.  Offer users the choice of a longer more self-describing name and a terser 
name.  For example: "function is_member_of|in (...) ...".

2.  Offer users the choice of similar length but different names.  For example: 
"function sum|add(x integer, y integer) returns integer ...".

3.  Make it easier to change your mind on a name while providing backwards 
compatibility for awhile.  For example: "function new_name|old_name (...) ...".

Personally I like the idea of developers not always having to be forced to 
choose among two equally good names, and making a wrapper function would be 
overkill for this feature.

-- Darren Duncan

In response to


pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2010-09-08 22:34:55
Subject: Re: function_name.parameter_name
Previous:From: Alvaro HerreraDate: 2010-09-08 22:08:26
Subject: Re: function_name.parameter_name

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group