Re: WIP: default values for function parameters

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "postgres hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: default values for function parameters
Date: 2008-11-24 13:34:16
Message-ID: 162867790811240534x6985cb33rc913bb5dd79303c3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2008/11/24 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2008/11/24 Peter Eisentraut <peter_e(at)gmx(dot)net>:
>>> Could you explain why you store the default expressions in a new posexpr
>>> type rather than in an array of text (compare pg_attrdef.adbin)?
>
>> I would to implement named params - and there expressions, that are
>> used as default params, should not be continual. I don't store params
>> as array of text because I would to eliminate repeated expression's
>> parsing. So I use similar machanism used for rules or views.
>
> Say again? The representation Peter is suggesting *is* what is used
> in rules and views. If you've re-invented that wheel, undo it.
>

Then I am blind. I store serialised transformed expression, but if
better solution exists, then I'll use it.

regards
Pavel Stehule

> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-24 13:37:30 Re: pgsql: Add support for matching wildcard server certificates to the new
Previous Message Tom Lane 2008-11-24 13:28:54 Re: Minor race-condition problem during database startup