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

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

 



On Friday, April 15, 2022, Sbob <sbob@xxxxxxxxxxxxxxxxxxxxx> 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.

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

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

David J.
 

[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux