own Function as Default VALUE - Mailing list pgsql-general

From Daniel Schuchardt
Subject own Function as Default VALUE
Date
Msg-id b0redm$1m9m$1@news.hub.org
Whole thread Raw
List pgsql-general
Hi @ all,

i have created a function that returns a guid. Now i want to make this
function as default for some rows.

CIMSOFT=# CREATE TABLE test (test VARCHAR(50) DEFAULT get_guid());
CREATE TABLE
CIMSOFT=# \d test
                         Table "public.test"
 Column |         Type          |              Modifiers
--------+-----------------------+-------------------------------------
 test   | character varying(50) | default
'{E3E8B504-A777-455A-9630-77ACFADC9A8A}'::character varying

??????

now a guid is the default, not the function itsself.

Thanks for tips.




pgsql-general by date:

Previous
From: eric soroos
Date:
Subject: ERROR: ExecEvalAggref
Next
From: Peter Nixon
Date:
Subject: Re: list server problems?