[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] parametrized domains
From: Paul Ramsey <pramsey () refractions ! net>
Date: 2005-04-29 17:41:29
Message-ID: 427271C9.8000909 () refractions ! net
[Download RAW message or body]
How about something that allows us to parameterize the type after it is
declared in the statement, as with the PRIMARY KEY, DEFAULT, etc, notations:
CREATE TABLE mygeotable (
id SERIAL PRIMARY KEY,
geom GEOMETRY NOT NULL PARAMETERS(4326,2),
inserted TIMESTAMP DEFAULT NOW()
);
P.
Tom Lane wrote:
> strk@refractions.net writes:
>
>>The most elegant solution would be to specify that at table
>>creation time. Something you already use with 'varchar' - for
>>example:
>
>
>> CREATE TABLE test ( a varchar(10); )
>
>
>> CREATE TABLE test ( geom geometry(4326); )
>
>
>>We asked Tom Lane about this, but he saied the parser were
>>not ready for this kind of extensibility. I cc him so if
>>he have news will let us know.
>
>
> It's still not :-(. Only datatypes that are hard-wired into the grammar
> can have parameters. My recollection is that this looks extremely
> difficult to change, because "foo(n)" looks far too much like a function
> call if foo is not a keyword known in advance to the grammar. We'd
> probably have to adopt some other notation instead.
>
> regards, tom lane
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic