Re: named parameters in SQL functions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: named parameters in SQL functions
Date: 2009-11-16 03:23:08
Message-ID: 603c8f070911151923h545c9ebdwf2b262d9335a8af4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 15, 2009 at 10:05 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> I don't see why it would need to be a reserved word.  We're not
>> changing how it gets parsed, just what it means.  At any rate
>> "FUNCTION." is a 9-character prefix, which is rather longer than I
>> would prefer.
>
> This from the guy who likes 40-character function names?

Hrm... I think this is bikeshedding at its finest - but having said
that, thinking about what I usually do a little more, my PL/pgsql
functions tend to be either triggers, which tend to have names like
tablename_postupdate() [so around 20 characters, depending on the
length of the table name] or else they tend to be functions that
update some sort of summary statistics... like, oh, say, updating the
task table with the total amount of time worked on each task by
aggregating over a time log table. Those functions tend to get a name
like update_task_time_worked(). That's only 23, but task is a pretty
short word, so some of them might be a bit longer than that. So maybe
40 is an overestimate, although I probably do have a few that are
close to that long.

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2009-11-16 03:25:02 Re: Aggregate ORDER BY patch
Previous Message Itagaki Takahiro 2009-11-16 03:15:48 Re: Add YAML option to explain