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 <kai...@ak.jp.nec.com>

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to