Re: Triggers and Domains

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ekekakos <ekekakos(at)hol(dot)gr>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Triggers and Domains
Date: 2009-08-30 17:01:37
Message-ID: 16416.1251651697@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

ekekakos <ekekakos(at)hol(dot)gr> writes:
> Thanks but how, in SQL server you put the function USER() (if I remember
> well) and it works.
> Here it does not work.

Define "does not work", please?

regression=# create domain username as text default user;
CREATE DOMAIN
regression=# create table foo(f1 int, lastupdateuser username);
CREATE TABLE
regression=# insert into foo(f1) values(42);
INSERT 0 1
regression=# select * from foo;
f1 | lastupdateuser
----+----------------
42 | postgres
(1 row)

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message ekekakos 2009-08-30 18:25:47 Re: Triggers and Domains
Previous Message ekekakos 2009-08-30 16:32:22 Re: Triggers and Domains