Re: [GENERAL] building extension with large string inserts

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] building extension with large string inserts
Дата
Msg-id 19661.1499267296@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] building extension with large string inserts  (Tom van Tilburg <tom.van.tilburg@gmail.com>)
Ответы Re: [GENERAL] building extension with large string inserts
Список pgsql-general
Tom van Tilburg <tom.van.tilburg@gmail.com> writes:
> I think I misunderstand. How would that help my insert statement?
> You would get INSERT INTO mytable VALUES ($ javascript with a lot of
> unescaped characters like /n " // etc. $);

Sure, but in a dollar-quoted literal you don't need to escape them.

https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING

> and: Am I correct that INSERTS are the way to go in extensions?

Seems reasonable, if you want the extension script to be self-contained.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom van Tilburg
Дата:
Сообщение: Re: [GENERAL] building extension with large string inserts
Следующее
От: Tom van Tilburg
Дата:
Сообщение: Re: [GENERAL] building extension with large string inserts