Skip site navigation (1) Skip section navigation (2)

Re: User-defined type name begins with the underscore character (_) can be created

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Golub <pavel(at)microolap(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: User-defined type name begins with the underscore character (_) can be created
Date: 2006-12-12 17:03:41
Message-ID: 4551.1165943021@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
Pavel Golub <pavel(at)microolap(dot)com> writes:
> Documentation says:
> "User-defined type names cannot begin with the
> underscore character (_)

We've never actually enforced that AFAIK, so this might be considered a
documentation bug.

> CREATE TYPE _my AS (id int4, id2 int4);
>
> CREATE TABLE my_table(
> my_arr my[]
> );

You could argue that the problem there is that LookupTypeName is not
verifying that what it finds is really an array of the specified type.
We could make it look up the given name without modification and then
apply get_array_type(), but this would mean two catalog lookups not one.
Still, that might be better than possibly breaking applications that
have historically worked.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Teodor SigaevDate: 2006-12-12 19:03:31
Subject: ERROR: failed to build any 4-way joins
Previous:From: Tom LaneDate: 2006-12-12 16:48:22
Subject: Re: SPI_getvalue calls output function w/o pushing existing SPI connection + 2 extra issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group