Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tpWCs-0071cg-Gk for pgsql-general@arkaria.postgresql.org; Tue, 04 Mar 2025 17:37:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tpWCq-003X66-Hc for pgsql-general@arkaria.postgresql.org; Tue, 04 Mar 2025 17:37:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tpWBf-003Q2a-Kd for pgsql-general@lists.postgresql.org; Tue, 04 Mar 2025 17:36:11 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tpWBc-000wGC-1C for pgsql-general@lists.postgresql.org; Tue, 04 Mar 2025 17:36:11 +0000 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3f67f825468so179947b6e.0 for ; Tue, 04 Mar 2025 09:36:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741109768; x=1741714568; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4bHKkmlgPzg0Hkeg/GuZux6SyhfzOWLPRXe86N8V1q4=; b=aTKGZ8lVEWHq8LSdfqxfSlNG2A6QbWYjyP7Zo3FUObr5eS6TAw88j2VYr9n6QsLky7 67zrMDxKcRw1ytjjrD+mhPAE2SZdLxsS5c3D03uiCY3woCuSomaOGJCicoC8tYQHx/VY DjYEDNwmPVabLMhPkl27XzgbS//L6ag5IW25EXwFvTvaf6jHVq5Kw3MaV2XMVKyDXLPD 1Oum8e7wNRAknJezxetkZMm2hU8x7Us5lXpVRIOLcgpzevbr2TjxRO881kbrpLuDge1N MfMp67XixpN3VOstZ6cMbps1SNoIEi9HkdtrdJ9t0fNmEOQCr6dN9MsquWdgTthlwQmC oqmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741109768; x=1741714568; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4bHKkmlgPzg0Hkeg/GuZux6SyhfzOWLPRXe86N8V1q4=; b=jVstkBP4VoTmdPzJEt1BfQHis12p+/sMDXW0m7y8gj/6hfvXhS8dcioeHS0kntVb8v WRHZ1zkRt/9QRUOZF2dR/Caf6NrP6i61xduqMKBMJqN2bjoVrMK6U6eZzuAgzS7ft+OC HAJR3jFUXcu5j/lP+A+8xY1RmdmK80Ny4GfAHPgOq274s9O9TrxDo5Ucjd8n/gh+c1GB +eWr8iFv3E+nQs1FvwqDYzE/a9oH7T73Aa3tx/P6XfCJRAeCxnHhxUZED+3hci4Si3N6 99tQmHo/gDWW94fZ8+dq8pUB0B3ApIe5W2eh3iNLvYhSo7kjLEHX4bSYG1ICEWTU3oTk T1yw== X-Gm-Message-State: AOJu0YzfCMbCWnJHUMpzNC59VRybRP4pa7nwbTO3xGupdlN2QFYJ927b M8QZzi1ZGWY9DoabUCgjTQyvyRdXE/xvYKYYJvVHdjiGv+DEVR5NPfQkBZCdMM11rcsgE33CY5F E3IdKrtfcJ370IhGgzZIZJLGpXZY= X-Gm-Gg: ASbGnctbFbFtxvYCzFDVArPUD0GoKrd6OE9fxyFHh22mVP5o33NbG/DE4/dEQmoFSAr wDeCCldvqHgtm8Sd2tV1MlTo4g1Ed48bZLXYB10mf/aRHB//UUKBTf3CXIiGPc2Lh1eZeW4JPIm Y8XexTqkgiJIoodBHDpgKXZqvi X-Google-Smtp-Source: AGHT+IGpGdEXyUqAAOcThVUvfx5jxpVZCF9Hx87kKHeoICsdZ8PBnLaWmN1hzV/+BMV+2vhYvYLn4soyAnlzrCepmrA= X-Received: by 2002:a05:6808:1527:b0:3f4:16fe:1852 with SMTP id 5614622812f47-3f558546c61mr13139309b6e.21.1741109768002; Tue, 04 Mar 2025 09:36:08 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:6802:1e0e:b0:589:13f9:e937 with HTTP; Tue, 4 Mar 2025 09:36:07 -0800 (PST) In-Reply-To: References: From: "David G. Johnston" Date: Tue, 4 Mar 2025 10:36:07 -0700 X-Gm-Features: AQ5f1JqalZvx6znNa7F53SkIGc3ESOj-5zVxVlG1UGLdkS4XvUuqzAp1lYtt5Hw Message-ID: Subject: Re: Error on the query To: Igor Korot Cc: "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000003ca296062f87b599" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003ca296062f87b599 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, March 4, 2025, Igor Korot wrote: > > [code] > queries.push_back( L"DO $$ BEGIN IF NOT EXISTS( SELECT 1 FROM > pg_class c, pg_namespace n WHERE n.oid =3D c.relnamespace AND c.relname > =3D \'abcatc_x\' AND n.nspname =3D \'public\' ) THEN CREATE UNIQUE INDEX > \"abcatc_x\" ON \"abcatcol\"(\"abc_tnam\" ASC, \"abc_ownr\" ASC, > \"abc_cnam\" ASC); END IF; END;" ); > [/code] > > What am I missing? > =E2=80=9C ERROR: unterminated dollar-quoted string at or near=E2=80=98 The terminator for your dollar-quoted string. David J. --0000000000003ca296062f87b599 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tuesday, March 4, 2025, Igor Korot <ikorot01@gmail.com> wrote:
[code]=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 queries.push_back( L"DO $$ BEGIN IF NOT EX= ISTS( SELECT 1 FROM
pg_class c, pg_namespace n WHERE n.oid =3D c.relnamespace AND c.relname
=3D \'abcatc_x\' AND n.nspname =3D \'public\' ) THEN CREATE= UNIQUE INDEX
\"abcatc_x\" ON \"abcatcol\"(\"abc_tnam\" ASC= , \"abc_ownr\" ASC,
\"abc_cnam\" ASC); END IF; END;" );
[/code]

What am I missing?

=E2=80=9C ERROR:=C2=A0 unterminated dollar= -quoted string at or near=E2=80=98

The terminator = for your dollar-quoted string.

David J.
=
=C2=A0
--0000000000003ca296062f87b599--