> On Dec 28, 2016, at 12:51, David Storrs wrote:
>
> There's also this:
>
> (query-rows db
>"
>SELECT column_name
> FROM information_schema.columns
> WHERE table_schema = 'your_schema'
> AND table_name = 'your_tab
There's also this:
(query-rows db
"
SELECT column_name
FROM information_schema.columns
WHERE table_schema = 'your_schema'
AND table_name = 'your_table'
")
On Wed, Dec 28, 2016 at 12:46 PM, Philip McGrath
wrote:
Something like this would be really good. I also, relatively recently,
discovered the "name" fields when I happened to look at a rows-result
directly, and being able to work with columns by name rather than by
position is much better. I guess I should have realized there was some way
of doing this,
For the last few years, I’ve believed that there was no way to get the column
names of tables using the db interface. Today I discovered that—using both
postgresql and sqlite3, at least—I can extract these from the “name” fields of
the “headers” field of the row-response to a “SELECT * FROM tabl
4 matches
Mail list logo