View Ticket
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to
or submit via the online form by Sep 9.
Ticket UUID: 2e14854f4f65874b001962b8b55232baf1fa6872
Title: [db columns table] doesn't recognize schema names
Status: Open Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: not_specified Resolution: Open
Last Modified: 2018-09-14 19:07:11
Version Found In: 1.0.0
User Comments:
anonymous added on 2015-09-02 16:33:04:

A console session to illustrate the problem follows below. Note that the documentation says:

"The columns object command allows the program to query the connection for the names of columns that exist in a given table."

In Postgres you identify tables by a fully qualified name, using the following name convention: <schema name>.

Main console display active (Tcl8.6.4 / Tk8.6.4)

(System32) 49 % package require tdbc::postgres


(System32) 50 % tdbc::postgres::connection create db -user postgres -password postgres -db mydb


(System32) 51 % db allrows {create schema myschema}

(System32) 52 % db allrows {create table myschema.mytable (id serial primary key, field1 text)}

(System32) 53 % db columns myschema.mytable field1

(System32) 54 % db columns mytable field1

relation "mytable" does not exist

(System32) 55 % db allrows {set search_path=myschema,public}

(System32) 56 % db columns mytable field1

field1 {name field1 type text nullable 1}

(System32) 57 %

adrianmedranocalvo (claiming to be added on 2018-09-14 19:07:11:
Please have a look at branch medranocalvo-correct-quoting [9485f6bb80].  Does it solve your problem?