Re: Posgres Adding braces at beginning and end of text (html) content

From: nighthawk <nighthawk(at)gmail(dot)com>
To: linnewbie <linnewbie(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Posgres Adding braces at beginning and end of text (html) content
Date: 2009-04-24 22:39:52
Message-ID: 7832fd560904241539v5f96898bwc84b52b208d401d0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Apr 2, 2009 at 3:33 PM, linnewbie <linnewbie(at)gmail(dot)com> wrote:

> set page_content [lindex [ dbh $sql ] 0]

I have never heard of tclodbc, but I believe you are putting the first
row into your variable, which is why it shows with curly braces. The
problem should be more obvious when you try to fetch more than one
column from the table. Try this:

set page_content [lindex [lindex [ dbh $sql ] 0] 0]

That should solve your problem.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Miguel Miranda 2009-04-24 23:37:22 delete duplicates takes too long
Previous Message Tom Lane 2009-04-24 21:55:58 Re: Can't use "any" with SQL functions