[postgis-users] parametrized domains

Mark Cave-Ayland m.cave-ayland at webbased.co.uk
Tue May 3 06:09:55 PDT 2005


Hi guys,

FWIW, what was Tom's response to this? I guess that since he is not on
postgis-users (and the moderator isn't around), his reply didn't get through
to the list much like his answer below didn't.


Kind regards,

Mark.

------------------------
WebBased Ltd
17 Research Way
Plymouth
PL6 8BT 

T: +44 (0)1752 791021
F: +44 (0)1752 791023
W: http://www.webbased.co.uk
 

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Paul Ramsey
> Sent: 29 April 2005 18:41
> To: Tom Lane
> Cc: strk at refractions.net; PostGIS Users Discussion
> Subject: Re: [postgis-users] parametrized domains
> 
> 
> 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 at 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
> 
> _______________________________________________
> postgis-users mailing list postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 





More information about the postgis-users mailing list