agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Moore <michaeljmoore@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: postgres list <pgsql-sql@postgresql.org>
Subject: Re: Why does the PL/pgSQL compiler do this?
Date: Mon, 31 Oct 2016 22:38:53 -0400
Message-ID: <20520.1477967933@sss.pgh.pa.us> (raw)
In-Reply-To: <CACpWLjMz+wvWLFQnaiA6pamqG2YJuahSWRhf-ov+Dfd7uXf8pw@mail.gmail.com>
References: <CACpWLjOkzeKNNLccAnR7EyMYH+4w8SnhEve43rD+VLoXQ4ROEw@mail.gmail.com>
	<CAKFQuwYjBuTC59cnndRBb=42g0Y4DLQDx1Tm0JSROGTq0R0mFA@mail.gmail.com>
	<CACpWLjOVudD-7JEVu=u4UUMWLQeAoQzfAiPwj9xjPnBqWHxKnw@mail.gmail.com>
	<CACpWLjMz+wvWLFQnaiA6pamqG2YJuahSWRhf-ov+Dfd7uXf8pw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-sql>

Michael Moore <michaeljmoore@gmail.com> writes:
> I'm still a bit confused. If I replace the ROLLBACK; command with ELEPHANT;
> the result is a syntax error. Why doesn't ROLLBACK; produce the same error
> since it is not valid in the LANGUAGE plpgsql.

That's a runtime error so far as plpgsql is concerned, because it relies
on the SPI layer to throw the error.  It might be practical to complain
about it at compile time, but it would be some extra code that nobody's
written.

			regards, tom lane


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (11+ messages)  latest in thread

Message-ID: <20520.1477967933@sss.pgh.pa.us>
Permalink:  ../20520.1477967933@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20520.1477967933@sss.pgh.pa.us

reply

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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michaeljmoore@gmail.com, david.g.johnston@gmail.com
  Subject: Re: Why does the PL/pgSQL compiler do this?
  In-Reply-To: <20520.1477967933@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox