Re: store and retrieve html in postgres from rails

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "john(dot)tiger" <john(dot)tigernassau(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: store and retrieve html in postgres from rails
Date: 2015-03-30 20:16:59
Message-ID: CAKFQuwbkYHDTS7u6ij9sSZUbhCbv_SUYe79nJQtX51nV3SQmUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 30, 2015 at 1:06 PM, john.tiger <john(dot)tigernassau(at)gmail(dot)com>
wrote:

> want to include html text from newsletters into postgres - then retrieve
>
> have seen posts saying this is really difficult (?) and others just
> sugesting pg_escape_string and pg entities -
> tried to put into text field but it seems stripped out
> does anyone have a good suggestion

​Forget structural format. What you are doing is storing and retrieving
text. Use the "text" data type. If you are having issues supply some
code/examples so others can point out what you are doing wrong. Saying "it
seems stripped out" doesn't communicate anything substantially useful.

​You can encode and decode at the application layer.​

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-03-30 20:30:16 Re: JSON "pretty" and selecting nested JSON fields
Previous Message john.tiger 2015-03-30 20:06:24 store and retrieve html in postgres from rails