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

From: John Cheng <jlcheng(at)ymail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Posgres Adding braces at beginning and end of text (html) content
Date: 2009-04-02 13:47:16
Message-ID: 862298.59437.qm@web43415.mail.sp1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


PostgreSQL does not add braces to text. It sounds like a problem with the code you have that inserts and retreives data out of PostgreSQL

Let's try a test case:

BEGIN;
CREATE TEMP TABLE test_table (
foo text
);
INSERT INTO test_table (foo) VALUES('<html>foo</html>');
SELECT foo FROM test_table;
ROLLBACK;

The result of the select statement should look like:

foo
------------------
<html>foo</html>
(1 row)

i.e., no added braces.

----
John L. Cheng

________________________________
From: linnewbie <linnewbie(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Sent: Thursday, April 2, 2009 5:48:40 AM
Subject: [GENERAL] Posgres Adding braces at beginning and end of text (html) content

Hi All,

I'm fairly new to postgres and I'm having this peculiar problem.

I'm storing raw html in a text field and I want users who know HTML to
update the content in a textarea field.

The problem is postgres is adding braces to the begining and ending of
the content. On creation and every time I update.

This is:

I input:

<p>xyz <p/>
..........

into the text area field I save and view I see

{<p>xyz</p>

..........

}

On a subsequent update I see

{{<p>xyz</p>
.........

}}

On another I see

{{<p>xyz</p>

.....

}}

Not sure what is happening here?
I am using postgres 8.3 on windows

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2009-04-02 14:01:18 Re: Posgres Adding braces at beginning and end of text (html) content
Previous Message Leif B. Kristensen 2009-04-02 13:45:28 Re: Posgres Adding braces at beginning and end of text (html) content