Re: copymanager question

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: copymanager question
Date: 2014-09-01 18:18:22
Message-ID: 1409595502239-5817227.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

swaroop wrote
> Hello all
>
> I am using cm instead of preparedstmts for faster inserts . But have a
> question on inserting
> values which have quotes in them (maybe single or double). Using
> preparedstmts, we know
> its safe to do so by calling setString. Is it possible to do the same here
> as i do not want
> to blindly single quote a string value in copyin.
>
> Basically i am looking for the same robustness of preparedstmt(at)setString
>
> Can i use functions like quote_literal ? Any help is very much
> appreciated.
>
> thanks

Copy data is literal. Since there is no interpretation of the data there is
no opportunity for injection.

You might want to provide an example as I'm not fully clear on exactly what
your need is.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/copymanager-question-tp5817197p5817227.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patrick Krecker 2014-09-01 23:53:03 Re: WAL receive process dies
Previous Message Jerry Sievers 2014-09-01 17:57:17 Re: Getting invalid page header in block while vacuuming PostgreSQL DB.