Error on the query

From: Igor Korot <ikorot01(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Error on the query
Date: 2025-03-04 17:30:37
Message-ID: CA+FnnTxq1e5wRjjO2VDfikkn0Stq6W8qFFykE9iJskSz=2+7Ug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, ALL,
Trying to execute following query:

[code]
queries.push_back( L"DO $$ BEGIN IF NOT EXISTS( SELECT 1 FROM
pg_class c, pg_namespace n WHERE n.oid = c.relnamespace AND c.relname
= \'abcatc_x\' AND n.nspname = \'public\' ) THEN CREATE UNIQUE INDEX
\"abcatc_x\" ON \"abcatcol\"(\"abc_tnam\" ASC, \"abc_ownr\" ASC,
\"abc_cnam\" ASC); END IF; END;" );
[/code]

I got:

[quote]
$4 = L"ERROR: unterminated dollar-quoted string at or near \"$$ BEGIN
IF NOT EXISTS( SELECT 1 FROM pg_class c, pg_namespace n WHERE n.oid =
c.relnamespace AND c.relna
me = 'abcatc_x' AND n.nspname = 'public' "...

[/quote]

What am I missing?

Thank you.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2025-03-04 17:35:23 Re: Error on the query
Previous Message chandan Kumar 2025-03-04 15:45:39 Re: Review my steps for rollback to restore point