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

Re: On hardcoded type aliases and typmod for user types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: On hardcoded type aliases and typmod for user types
Date: 2005-08-31 21:14:13
Message-ID: 4837.1125522853@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> I was thinking actually of setting the type searching code to search
> pg_catalog before the normal search_path. The types being hardwired
> into the grammer essentially implied this so I thought I would avoid
> surprises.

That strikes me as an unnecessary reduction in flexibility.  As long as
we make the hardwired type names translate to qualified names (same as
they do now) we don't have to assume any such thing.

(What I might actually favor doing that for is operators, because the
schema-qualified syntax for operators is so gross.  But I don't see a
need for it for type names.)

>> Hmm... actually there's a bit of an issue here, which is that it's not
>> clear whether schema qualification makes sense for the multi-word type
>> names.  For instance
>> pg_catalog.character varying

> It doesn't work. The current grammer, even now, treats anything schema
> qualified as non-special. You can't schema qualify char(4) even if you
> want to. Incidently, these typmod changes for user types would make
> this work as a side-effect.

Right.  I think that
	pg_catalog.varchar(n)
is reasonable and should be accepted, but I'm fine with decreeing that
	character varying(n)
will always be special non-schema-qualified syntax (which the grammar
will in fact translate into the former).

The point about character sets is a bit distressing; here we are
designing a new general-purpose mechanism and we can already see
cases it doesn't handle.  Can we fix that?

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2005-08-31 21:25:31
Subject: Indexing dead tuples
Previous:From: Simon RiggsDate: 2005-08-31 21:07:04
Subject: Re: Pre-allocated free space for row

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