From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: What's the CURRENT schema ? |
Date: | 2002-04-04 05:18:22 |
Message-ID: | Pine.LNX.4.30.0204040003120.684-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane writes:
> PUBLIC is a reserved keyword, so you have to do something like
> select * from "public".vs1;
> if there is a vs1 hiding it in an earlier namespace in the search
> path.
PUBLIC can be made less reserved easily. See patch below.
> I've been vacillating about whether to choose another name for the
> public namespace to avoid the need for quotes here. I can't think
> of another good name :-(
PUBLIC is a good name. Oracle uses it, I think.
diff -u -r2.299 gram.y
--- gram.y 1 Apr 2002 04:35:38 -0000 2.299
+++ gram.y 4 Apr 2002 05:10:23 -0000
@@ -2558,14 +2558,14 @@
n->groupname = NULL;
$$ = (Node *)n;
}
- | GROUP ColId
+ | GROUP UserId
{
PrivGrantee *n = makeNode(PrivGrantee);
n->username = NULL;
n->groupname = $2;
$$ = (Node *)n;
}
- | ColId
+ | UserId
{
PrivGrantee *n = makeNode(PrivGrantee);
n->username = $1;
@@ -5897,7 +5897,6 @@
Iconst: ICONST { $$ = $1; };
Sconst: SCONST { $$ = $1; };
-UserId: ColId { $$ = $1; };
/*
* Name classification hierarchy.
@@ -5913,6 +5912,13 @@
/* Column identifier --- names that can be column, table, etc names.
*/
ColId: IDENT { $$ = $1; }
+ | unreserved_keyword { $$ = $1; }
+ | col_name_keyword { $$ = $1; }
+ | PUBLIC { $$ = "public"; }
+ ;
+
+/* User identifier */
+UserId: IDENT { $$ = $1; }
| unreserved_keyword { $$ = $1; }
| col_name_keyword { $$ = $1; }
;
--
Peter Eisentraut peter_e(at)gmx(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-04-04 06:24:34 | Re: Contrib update |
Previous Message | Hiroshi Inoue | 2002-04-04 04:54:25 | Re: What's the CURRENT schema ? |