From: Tom Lane <tgl@sss.pgh.pa.us>
To: jan.mate@inf-it.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7838: pg_dump major bug
Date: Wed, 30 Jan 2013 12:31:13 -0500
Message-ID: <9691.1359567073@sss.pgh.pa.us> (raw)
In-Reply-To: <E1U0KwQ-0005ME-MQ@wrigleys.postgresql.org>
References: <E1U0KwQ-0005ME-MQ@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
jan.mate@inf-it.com writes:
> I created a very simple example to reproduce the problem (looks like it is a
> pg_dump problem). Here are the links to files used in my example:
> http://www.inf-it.com/fixes/postgres-bugreport/test.sql
Huh. That's not pg_dump's fault --- it's a grammar bug. The server
should accept something like
select ((select array[1,2]))[1];
but it does not. I see that you dodged the grammar bug in your view
definition by inserting a useless cast:
select ((select array[1,2])::int[])[1];
but you shouldn't have had to do that. The useless cast is omitted when
the view definition is regurgitated (indeed it's not there in the
internal form at all), and then the parser fails on that version of the
query text.
This seems to be easy to fix with one more grammar production to cover
the case of "c_expr ::= select_with_parens indirection". But I'm
surprised we've not heard complaints before, because this area of the
grammar has been like that for a very long time.
Will fix, thanks for the report!
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, jan.mate@inf-it.com
Subject: Re: BUG #7838: pg_dump major bug
In-Reply-To: <9691.1359567073@sss.pgh.pa.us>
References: <E1U0KwQ-0005ME-MQ@wrigleys.postgresql.org> <9691.1359567073@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