public inbox for [email protected]
help / color / mirror / Atom feedFrom: Sbob <[email protected]>
To: Pgsql-admin <[email protected]>
Subject: Re: Having issues inserting a string with a ' into a varchar column
Date: Fri, 15 Apr 2022 12:02:57 -0600
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
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
>
>
>
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Having issues inserting a string with a ' into a varchar column
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox