[postgis-users] How can I split a polyline?

Michael Fuhr mike at fuhr.org
Wed Mar 8 09:06:22 PST 2006


On Wed, Mar 08, 2006 at 08:28:18AM -0500, Fay Du wrote:
> I have a further question. In my application, I don't know column name
> in front. For example, it could be "label", it could be "tag", there
> could be 3 columns, and there could be 10 columns. Before I split lines,
> can I get the number of columns and each column name programmatically?

Applications can query the system catalogs or the Information Schema.

http://www.postgresql.org/docs/8.1/interactive/catalogs.html
http://www.postgresql.org/docs/8.1/interactive/information-schema.html

One way to learn how to query the system catalogs is to watch what
psql does when you enter \d commands.  Run "psql -E" or execute the
command "\set ECHO_HIDDEN" and then run "\d tablename".

-- 
Michael Fuhr



More information about the postgis-users mailing list