[postgis-users] pgscript returns text in brackets and quotes

adrian.kitchingman at dse.vic.gov.au adrian.kitchingman at dse.vic.gov.au
Thu Nov 10 16:55:40 PST 2011


Hi All

I'm having an issue with pgscript where a query returning a sting encases 
the text in brackets and quotes. This doesn't help when trying to use the 
returned text in further queries. I haven't been able to find a simple 
work around so thought one of you may have a fix. Below is some script 
which, for me, produces the result ("POLYGON"). All I want is POLYGON.

DECLARE @table, @geotype;
SET @table = 'table_name';
SET @geotype = SELECT GeometryType(geom) FROM @table LIMIT 1;
PRINT @geotype;

Cheers

Adrian


Notice:
This email and any attachments may contain information that is personal, 
confidential, legally privileged and/or copyright.No part of it should be reproduced, 
adapted or communicated without the prior written consent of the copyright owner. 

It is the responsibility of the recipient to check for and remove viruses.
If you have received this email in error, please notify the sender by return email, delete 
it from your system and destroy any copies. You are not authorised to use, communicate or rely on the information 
contained in this email.

Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111111/b2dbceb2/attachment.html>


More information about the postgis-users mailing list