Re: stand-alone composite types patch (was [HACKERS] Proposal:

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: stand-alone composite types patch (was [HACKERS] Proposal:
Date: 2002-08-08 21:11:38
Message-ID: 3D52DE8A.8000007@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> You have missed a number of places where this new relkind ought to
> be special-cased the same way RELKIND_VIEW is --- for example
> CheckAttributeNames and AddNewAttributeTuples, since a composite type
> presumably shouldn't have system columns associated. I'd counsel
> looking at all references to RELKIND_VIEW to see which places also need
> to check for RELKIND_COMPOSITE_TYPE.

One of the places I missed was pg_dump.c. In working on pg_dump support,
I ran across a problem:

test=# CREATE TYPE "MyInt42" (internallength = 4,input = int4in,output =
int4out,alignment = int4,default = 42,passedbyvalue);
CREATE TYPE
test=# CREATE TYPE "compfoo" AS (f1 "MyInt42", f2 integer);
CREATE TYPE
test=# drop type compfoo;
DROP TYPE
test=# CREATE TYPE "compfoo" AS (f1 "MyInt42", f2 "integer");
ERROR: Type "integer" does not exist
test=# create table tbl_0 (f1 "integer");
ERROR: Type "integer" does not exist
test=# create table tbl_0 (f1 "MyInt42");
CREATE TABLE
test=# drop table tbl_0 ;
DROP TABLE
test=# create table tbl_0 (f1 integer);
CREATE TABLE

Shouldn't "integer" be recognized as a valid type?

Thanks,

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-08-08 21:19:04 Locale number format confusion
Previous Message Tom Lane 2002-08-08 20:58:11 Re: IRIX and large SMP: donations of shells &c

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2002-08-08 21:21:13 Re: SQL Comments
Previous Message Tom Lane 2002-08-08 14:37:32 Re: SQL Comments