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

Поиск
Список
Период
Сортировка
От Sbob
Тема Re: Having issues inserting a string with a ' into a varchar column
Дата
Msg-id a50a28fa-6f8b-4fd6-caa4-bcb0526fa5a5@quadratum-braccas.com
обсуждение исходный текст
Ответ на Having issues inserting a string with a ' into a varchar column  (Sbob <sbob@quadratum-braccas.com>)
Список pgsql-admin

correction, the quote_ident below should be quote_literal

I did not try quote_ident




On 4/15/22 12:01, Sbob wrote:

Hi all;


I have a table that includes a varchar column.

I am inserting some data and one of the strings = "Poker 5 card Hold'Em"

as a straight string it errors out.


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:


psql:test.sql:1042: ERROR:  syntax error at or near "Em"
LINE 1: ...ed) VALUES ( quote_literal('Poker 5 card Hold\\'Em'), 2, 1...


Thanks in advance



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

Предыдущее
От: Sbob
Дата:
Сообщение: 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