[postgis-devel] Re: [postgis-users] create tables smarter

Obe, Regina robe.dnd at cityofboston.gov
Thu Jun 5 07:48:46 PDT 2008


>>Hi, Mark,

>>Mark Cave-Ayland <mark.cave-ayland at siriusit.co.uk> wrote:

>> Paul Ramsey wrote:
>> > We should think pretty hard before doing this. As Tom noted, this
is
>> > not much different than just moving AddGeometryColumns into the
CREATE
>> > TABLE statement, in terms of information required. We also have the
>> > problem of what to DO with geometry that is defined WITHOUT these
>> > options. If I don't miss by guess, geometry created with a CREATE
>> > TABLE AS SELECT... will be in this category, for example.
>> 
>> I think this part will be okay. At least, if you do a CREATE TABLE AS

>> SELECT on a table with a field of varchar(255) then your new table 
>> should also contain a field of varchar(255).

>>But when you do operations like string concatentation, or
intersections
>>etc, the result type may require different typemods.


Which brings back to the point that you still need to support the
untypemod version.  Is that allowed similar to like how we have?

varchar (which is really unlimited)   vs.   varchar(255)

and when you concatenate you get -> text

And also a construct such as

SELECT CAST(ST_Intersection(a.the_geom, b.the_geom) As
Geometry('POLYGON',....))

which would throw an error if the intersection does not return the right
cast type you note.

Thanks,
Regina


-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.




More information about the postgis-devel mailing list