Forum OpenACS Q&A: how to quote a double quote in Postgres inserts...

I am trying to figure out which utility function does what I want.

I have a block of text submitted in a form, that has multiple
double quotes in it.  I want to insert the entire field/value of this
block of text wholesale into Postgres 7.1 .

I have tried using the $QQvaluename setting; however, while this
properly handles the case where you have a single-quote in the
middle of a value, it doesn't seem to handle double-quotes.

So, what is the best way to do this?

There shouldn't be a problem with double quotes. I insert text with double quotes all the time. Any string inside of single quotes should go into the database fine. LIke this:

INSERT INTO FOO '$QQvaluename'

Notice that the variable is inside of single quotes.