a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by mk
mk  ·  888 days ago  ·  link  ·    ·  parent  ·  post: Pubski: July 6, 2022

I'm learning/using PostGIS atm. It amazes me what can be done.

Tangentially, I have a very very basic Postgres question: Can you query Postgres and just get the value(s) from a row without JSON or any other formatting?

i.e.

  SELECT v1 FROM things WHERE id = 3;

..and if v1 is "foo", it only returns "foo". Not a table or JSON array with "foo" in it, etc.





veen  ·  881 days ago  ·  link  ·  

That's mostly likely a function of whatever thing / programme you're using to query. Through PGAdmin or QGIS I also always get a table back. But I get values back when I query via Python: psycopg's fetch functions return just the data in a semi-structured fashion.

mk  ·  863 days ago  ·  link  ·  

Yeah, I am querying with Arc. I guess I'll have to keep with my own parser.