From: | sferac(at)bo(dot)nettuno(dot)it |
---|---|
To: | hackers(at)postgresql(dot)org |
Subject: | CURRENT_USER |
Date: | 1998-02-27 17:25:46 |
Message-ID: | Pine.LNX.3.96.980227170759.9357A-100000@nero |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi
I tried to define a table on my Linux box, PostgreSQL 6.3 as:
java=> CREATE TABLE tabella(campo VARCHAR(30) DEFAULT CURRENT_USER);
ERROR: DEFAULT: type mismatched
java=> CREATE TABLE tabella(campo VARCHAR(30));
CREATE
java=> insert into tabella values (CURRENT_USER);
ERROR: parser: attribute 'campo' is of type 'varchar' but expression is of type 'name'
java=> insert into tabella values (CAST CURRENT_USER AS VARCHAR);
ERROR: func_get_detail: function varchar(name) does not exist
java=> insert into tabella values (CURRENT_USER::VARCHAR);
ERROR: func_get_detail: function varchar(name) does not exist
and I had this error. PostgreSQL CURRENT_USER returns a type "name",
but SQL-Standard says that niladic builtin function CURRENT_USER returns a
CHARACTER string representing the current authorization ID and "name" isn't
an SQL type. I think this is a bug. What do you think about?
(see A Guide To The SQL Standard C.J.Date).
Ciao, Jose'
___, /
|_+_| /| / ~
~~~~~~~~~~~~~~~~~~~~~~~~~ | / | /| ~~~~~~~~~~~~~~~~~~~~~
Jose' Soares Da Silva ~ |/ | / | / "As armas e os Baroes
Progetto "OS LUSIADAS" ~ | |/| | /| assinalados, que da
SFERA CARTA SOFTWARE ~ /| / | | / | Occidental praia Lusitana
Via Bazzanese, 69 / | / | | /| | por mares nunca de antes
Casalecchio R. BO - Italy / | / | |/ | | navegados, passarono
http://www.sferacarta.com / |/____|_/__|_| ainda alem da Taprobana"
sferac(at)bo(dot)nettuno(dot)it /____|__| | __|___________ ~
Fax. ++39 51 6131537 ____________|_____|_/ LUSIADAS / (Luis de Camoes,
Tel. ++39 51 591054 \ o / Os Lusiadas, canto I)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-02-27 18:17:41 | 6.3 Features |
Previous Message | Bruce Momjian | 1998-02-27 17:19:34 | Re: [HACKERS] Money type display |