Re: Proposal: stand-alone composite types - Mailing list pgsql-hackers

From Joe Conway
Subject Re: Proposal: stand-alone composite types
Date
Msg-id 3D515113.5020500@joeconway.com
Whole thread Raw
In response to Proposal: stand-alone composite types  (Joe Conway <mail@joeconway.com>)
Responses Re: Proposal: stand-alone composite types  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Joe Conway wrote:
> 2. Borrow the needed parts from CREATE and DROP VIEW to implement a new
>    form of the CREATE TYPE command, with syntax something like:
> 
>    CREATE TYPE typename AS ( column_name data_type [, ... ] )
> 
>    This would add a pg_class entry of relkind 'c', and add a new
>    pg_type entry of typtype 'c', with typrelid pointing to the
>    pg_class entry. Essentially, this new stand-alone composite type
>    looks a lot like a view without any rules.

I'm working on stand-alone composite types and running into a 
reduce/reduce problem with the grammer. Any suggestions would be 
appreciated. Here's what I have:

DefineStmt:  CREATE AGGREGATE func_name definition  {    . . .  }  | CREATE TYPE_P qualified_name AS    '('
TableFuncElementList')'  {    CompositeTypeStmt *n = makeNode(CompositeTypeStmt);    n->typevar = $3;    n->coldeflist
=$6;    $$ = (Node *)n;  }
 

Thanks,

Joe



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: OSDB (was: Heap tuple header issues)
Next
From: Bruce Momjian
Date:
Subject: Re: Open 7.3 items