Re: Proposal: stand-alone composite types

From: Joe Conway <mail(at)joeconway(dot)com>
To:
Cc: pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Proposal: stand-alone composite types
Date: 2002-08-07 16:55:47
Message-ID: 3D515113.5020500@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2002-08-07 21:12:02 Re: Open 7.3 items
Previous Message Joe Conway 2002-08-07 16:35:19 Re: OSDB (was: Heap tuple header issues)

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2002-08-07 18:09:40 Re: Fix disabled triggers with deferred constraints
Previous Message Tom Lane 2002-08-07 16:46:23 Re: Fix disabled triggers with deferred constraints