Re: Select default values

From: Giorgio Valoti <giorgio_v(at)mac(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Select default values
Date: 2008-07-26 20:20:41
Message-ID: 252ABD01-5957-48E1-AF5F-72FFC48EBD30@mac.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On 24/lug/08, at 23:15, Richard Broersma wrote:

> On Thu, Jul 24, 2008 at 12:35 PM, Giorgio Valoti
> <giorgio_v(at)mac(dot)com> wrote:
>
>>> Um - there is no default value for a function.
>>
>> Without this "feature" you have to overload
>> the function arguments.
>
> You could pass a casted null to the function. The would eliminate
> function overloading. Then internally you could handle the null by
> passing DEFAULTS to you INSERT or UPDATE statements. I don't know if
> this would work for you in this case.

It could work but only if I use a domain that allows NULLs, which
reduces the usefulness of domains even if you can work around that by
simply stating the not null clause in the table definition.

--
Giorgio Valoti

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message TJ O'Donnell 2008-07-27 13:57:37 Re: Efficiently determining the number of bits set in the contents of, a VARBIT field
Previous Message Allan Kamau 2008-07-26 13:17:56 Efficiently determining the number of bits set in the contents of a VARBIT field