Search Postgresql Archives

Re: building extension with large string inserts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom van Tilburg <tom.van.tilburg@xxxxxxxxx> writes:
> I am trying to build an extension where there is the need to insert large
> strings consisting of javascript code.
> ...
> What would be a proper way to get this code into a table via an extension?
> I've been working on generating INSERT statements for the extension's sql
> file but it seems a tedious job to escape the code myself.

Can't you use a dollar-quoted string?  You just need to pick a delimiter
that doesn't appear anywhere in the javascript, say $JaVaScRiPt$ ...

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux