Curly braces in DB
A Tcl interface to PostgreSQL databases, written in Tcl
Brought to you by:
lbayuk
I don't know if this is a bug, but it's annoying:
I use Postgres 9.5.5. When I try to amend a table entry like this:
set name "My Name"
pg_exec $db "UPDATE address SET name='$name' where objectid=$adrno;"
the value appeas as {My Name} in the database (with curly braces!).
Am I doing someting wrong?
It would be a bug, if it were true, but it isn't. If you haven't already done so, check the database with psql (for example) to be sure the braces aren't in the data. If not, then you need to look at how you are querying the record, and how you are reporting or using the data. I suspect you are seeing the braces only because Tcl is adding them, which usually happens when somebody mixes up usage of Tcl strings and lists.