Given: We are accessing a PostgreSQL DB from a VB NET application. When the query completes the DB rows are delivered in a VB NET
DataTable. The Postgre DB geom column is in the format of
System.Bytes (a byte array). I can convert the Byte array to the WKB format but converting the WBK to WKT format appears more complex. Hence, I was thinking I could return the geom col results as WKT.
My issue with this is I cannot use a
SELECT * in the query to the DB. It seems I will need to parameterize ALL the columns in the
SELECT command since I want the geom column in a DIFFERENT format.
SELECT * FROM temporary.summmarytable WHERE conditions = 'xxxxx'
has to become:
SELECT col1, col2 , col3. col4....ST_AsText(geom) WHERE condition = 'xxxxx'
I'm not a fan of long paramterized column lists as shown above. Is there a way to reset the geom output within a PostgreSQL function.