Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfQGM-0000Nj-6z for pgsql-admin@arkaria.postgresql.org; Fri, 15 Apr 2022 18:01:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nfQGK-00071q-NZ for pgsql-admin@arkaria.postgresql.org; Fri, 15 Apr 2022 18:01:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfQGJ-000712-HX for pgsql-admin@lists.postgresql.org; Fri, 15 Apr 2022 18:01:40 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfQGH-0008IX-0L for pgsql-admin@lists.postgresql.org; Fri, 15 Apr 2022 18:01:38 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id E0E623201061; Fri, 15 Apr 2022 14:01:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 15 Apr 2022 14:01:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= quadratum-braccas.com; h=cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1650045694; x=1650132094; bh=ZyAKmUYzyd SQNmykDIQ9XHIzWgFm1smg7DbTCqS6tBI=; b=ArTvIJWvpwKR9Oik+Pf1uhG1fS tCV9OpbGZ2dYXCHw1326S9o1yBoxxYvUYfgNDkU5yW4gabj11Bgs/jznofJUL/To tKTAYFvJPPQ6Eh1ucKbSJQ/YpcLNiOxo6PXAxLrdFLCgK5/aryY7ZML2oiXk8oAM +wpKIy9msDPo/aSgCwTl6DskzRGCuGVWjCpByFPE3/U6rJNa4i/5UmLil/H7WOXv l5axmM8T8Ou6XmGezsGzIf4aFF9gRChP+sE6WJ39ApzYzMlmEtCA3nM+b4xuR3gc kmZumdn+Btuyy5N/ES5IlLfj0NNNTV8gVnSDuEbiNkNLCS74hAm8vQYCIntQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1650045694; x=1650132094; bh=ZyAKmUYzydSQN mykDIQ9XHIzWgFm1smg7DbTCqS6tBI=; b=mkan8ZeRh5wevDdmn4e5Li169aaS+ p+2EguidTwWR3N+ivqmxgoq0s604OCTVpJ6WRX/lwFWnbKAzRT2P1eYGUi42F69t jCOf6V2SLFuPxtzdkdH6W09x2q3udKbNsspCbqwcQHVfpLi0dUHMtbrWnnWzlTly VhKrBMW2NebQDMiQ0YWgvBEyTYJgaZCZWVjDw3HWBJleLMOlgTmafZSpncUBseiI 43LYk/fDesdUFfMi7UHZYQcrGFxAoLHA2os8u0iTRp831zj4FRP1QK5DT9MncMd9 61zJPqkMeIyQrJWp2weHm3ZbuEogBkcZ/K2MuIo5snG68Zak1oYKUaaPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudelhedguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkffggfgfvhffusegrtderre dtfeejnecuhfhrohhmpefusghosgcuoehssghosgesqhhurggurhgrthhumhdqsghrrggt tggrshdrtghomheqnecuggftrfgrthhtvghrnhepteehvdeugeevhfevgeefheelhfette efvdeivdeihfejueehffekueefvdejtedtnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepshgsohgssehquhgrughrrghtuhhmqdgsrhgrtggtrg hsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 15 Apr 2022 14:01:33 -0400 (EDT) Content-Type: multipart/alternative; boundary="------------uDbLzSrOj008nuDhRb5ob4kZ" Message-ID: <182146b5-7239-9fdb-1a17-2c16f306f76f@quadratum-braccas.com> Date: Fri, 15 Apr 2022 12:01:31 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 To: Pgsql-admin Content-Language: en-US From: Sbob Subject: Having issues inserting a string with a ' into a varchar column List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------uDbLzSrOj008nuDhRb5ob4kZ Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------uDbLzSrOj008nuDhRb5ob4kZ Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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



--------------uDbLzSrOj008nuDhRb5ob4kZ--