Re: Having issues inserting a string with a ' into a varchar column

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Having issues inserting a string with a ' into a varchar column
Дата
Msg-id CAKFQuwbzdZ38iZXN9Mp3PEt767b9h-C91evBtAWo8GD_oqatMw@mail.gmail.com
обсуждение исходный текст
Ответ на Having issues inserting a string with a ' into a varchar column  (Sbob <sbob@quadratum-braccas.com>)
Список pgsql-admin
On Friday, April 15, 2022, Sbob <sbob@quadratum-braccas.com> wrote:

I tried this :  quote_ident ( 'Poker 5 card Hold'Em')

but it still error's out


I also tried :  quote_literal('Poker 5 card Hold\'Em')

but it also errors out:


You have the right idea you need to escape it.  But guessing isn’t a good method to figure out how.


You can’t use quote_* on a literal if you do not express the literal correctly.

David J.
 

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

Предыдущее
От: Sbob
Дата:
Сообщение: Re: Having issues inserting a string with a ' into a varchar column
Следующее
От: Kenny Bachman
Дата:
Сообщение: postgresql-14 slow query