From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: query can't merge into table of the other schema
Date: Wed, 07 Nov 2018 17:36:02 -0500
Message-ID: <12036.1541630162@sss.pgh.pa.us> (raw)
In-Reply-To: <c56d9a46-be49-eac3-f3c3-efd76240aea6@gmail.com>
References: <1425722754.312953.1541603425493.ref@mail.yahoo.com>
<1425722754.312953.1541603425493@mail.yahoo.com>
<c56d9a46-be49-eac3-f3c3-efd76240aea6@gmail.com>
Ron <ronljohnsonjr@gmail.com> writes:
> On 11/07/2018 09:10 AM, Pepe TD Vo wrote:
>> *ERROR: "cidrdba.sc_date_in" is not a known variable*
> That doesn't look like a "can't merge table from another schema" error.
>> *LINE 13: MERGE INTO cidrdba.sc_date_in prod*
>> * ^*
>> *SQL state: 42601*
>> *Character: 352*
> What happens when you run the statement through psql?
It will fail, of course, since there's no MERGE statement in Postgres.
I think the reason for the weird error is that the plpgsql scanner is
seeing the "INTO cidrdba.sc_date_in" part and trying to process that
as an "INTO plpgsql-variable" clause, before it's fed the rest of the
statement to the core parser, which is what would notice that MERGE
isn't a known command. Maybe we could improve matters by reordering
that processing, but it might be a lot of work for a small benefit.
regards, tom lane
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: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: query can't merge into table of the other schema
In-Reply-To: <12036.1541630162@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox