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 [email protected]
or submit via the online form by Sep 9.
Ticket UUID: ed1c750d97c4eba5f1c93730574f79f15b7ebc8a
Title: tdbc columns method tries to select all data from a table
Status: Open Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: not_specified Resolution: Open
Last Modified: 2018-09-14 19:08:10
Version Found In:
User Comments:
anonymous added on 2016-01-12 00:48:46:
Copied from here:

The 'columns' method executes 'SELECT * from table' SQL statement, which makes it unusable for anything but the smallest tables in a database.
There's a bug in generic/tdbcpostgres.c file (ConnectionColumnsMethod function, line 1467). The code which is supposed to "Check if table exists by retrieving one row" actually retrieves all rows as there's no restriction on the result data set size.
I think something like 'limit 1' should be added to the sqlQuery string there.

adrianmedranocalvo added on 2018-09-14 19:08:10:
I fixed this in branch medranocalvo-correct-quoting [9485f6bb80].  Please test it.