Menu

#3 Curly braces in DB

None
closed
nobody
None
3
Invalid
2017-11-12
2017-03-07
No

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?

Discussion

  • lbayuk

    lbayuk - 2017-03-07

    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.

    % set a "My name"
    My name
    % set a
    My name
    % list $a
    {My name}
    
     
  • lbayuk

    lbayuk - 2017-11-12
    • status: open --> closed
    • Resolution: None --> Invalid
     

Log in to post a comment.