Re: SE-PgSQL patch review

From: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp
Cc: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SE-PgSQL patch review
Date: 2009-11-25 01:52:04
Message-ID: 4B0C8DC4.7030202@ak.jp.nec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

KaiGai Kohei wrote:
> Ross J. Reedstrom wrote:
>> On Tue, Nov 24, 2009 at 03:12:43PM +0900, KaiGai Kohei wrote:
>>> Itagaki Takahiro wrote:
>>>> * CREATE TABLE tbl (col integer AS SECURITY_CONTEXT = '...')
>>>> Is the syntax "<AS> SECURITY_CONTEXT" natural in English?
>>> We need to put a reserved token, such as "AS", prior to the
>>> SECURITY_CONTEXT
>>> to avoid syntax conflicts to "DEFAULT b_expr" option.
>>
>> Does "WITH" work? Seems to read better to me:
>>
>> CREATE TABLE tbl (col integer WITH SECURITY CONTEXT [...])
>>
> It was conflicted. :(

BTW, we have two options, if we don't use AS token here.

1. It moves "SECURITY" to reserved keyword.
We can represent SECURITY CONTEXT option for each columns quite
natural, but it also has a pain. It disallow to use "security"
as a column name.

2. Another syntax to support SECURITY CONTEXT
For example:
CREATE TABLE tbl_name (
col_X_name int primary key,
col_Y_name text default 'aaa'
) SECURITY CONTEXT ( 'label of the table',
col_Y_name IS 'label of the column Y', ... );

I don't have any preference between the current syntax and the new one.

Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Konstantin Izmailov 2009-11-25 02:00:20 Re: pg_attribute.attnum - wrong column ordinal?
Previous Message Greg Stark 2009-11-25 01:30:28 Re: pg_attribute.attnum - wrong column ordinal?