pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
9.3beta2 unrecognized node type in join alias vars when retrieving view definition
4+ messages / 3 participants
[nested] [flat]

* 9.3beta2 unrecognized node type in join alias vars when retrieving view definition
@ 2013-07-22 11:22  Feike Steenbergen <feikesteenbergen@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Feike Steenbergen @ 2013-07-22 11:22 UTC (permalink / raw)
  To: pgsql-bugs

Hi all,

While testing the 9.3 beta I am unable to get the view definition for
some views.
Because of this I cannot use pg_dump to create a valid dump of the
specified database.

ERROR:  unrecognized node type in join alias vars: 309

- I can select from the views and the results are valid.
- The views use recursion
- I cannot reproduce this on a 9.2.4

Simple testcase:
- create the database
- load dumpfile from 9.2 into the database
- select something from the view
- select the view definition
- describe the view


postgres@fslaptop:~$ psql --command "CREATE DATABASE viewbugtest"
CREATE DATABASE
postgres@fslaptop:~$ zcat bugtest.sql.gz | psql --no-psqlrc
--single-transaction --quiet viewbugtest

[...]

postgres@fslaptop:~$ psql -E --no-psqlrc viewbugtest --command="SELECT
pg_catalog.pg_get_viewdef( (SELECT oid FROM pg_class WHERE
relname='gasverbruik_maand') )"
ERROR:  unrecognized node type in join alias vars: 309

postgres@fslaptop:~$ psql -E --no-psqlrc viewbugtest --command="SELECT
* FROM gasverbruik_maand LIMIT 1"
   maand    |   stand   | verbruik | dagverbruik | graaddagen
------------+-----------+----------+-------------+------------
 2009-01-01 | 28746.000 |   50.727 |       1.636 |      530.9
(1 row)

postgres@fslaptop:~$ psql --no-psqlrc viewbugtest --command="\dv+
gasverbruik_maand"
                         List of relations
 Schema |       Name        | Type | Owner |  Size   | Description
--------+-------------------+------+-------+---------+-------------
 public | gasverbruik_maand | view | feike | 0 bytes |
(1 row)



postgres@fslaptop:~$ pg_config
BINDIR = /postgres/app/pg93/bin
DOCDIR = /postgres/app/pg93/share/doc
HTMLDIR = /postgres/app/pg93/share/doc
INCLUDEDIR = /postgres/app/pg93/include
PKGINCLUDEDIR = /postgres/app/pg93/include
INCLUDEDIR-SERVER = /postgres/app/pg93/include/server
LIBDIR = /postgres/app/pg93/lib
PKGLIBDIR = /postgres/app/pg93/lib
LOCALEDIR = /postgres/app/pg93/share/locale
MANDIR = /postgres/app/pg93/share/man
SHAREDIR = /postgres/app/pg93/share
SYSCONFDIR = /postgres/app/pg93/etc
PGXS = /postgres/app/pg93/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--prefix=/postgres/app/pg93' '--with-perl'
'--with-python' '--with-ldap' '--with-openssl' '--with-gssapi'
CC = gcc
CPPFLAGS = -D_GNU_SOURCE
CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard
CFLAGS_SL = -fpic
LDFLAGS = -L../../../src/common -Wl,--as-needed
-Wl,-rpath,'/postgres/app/pg93/lib',--enable-new-dtags
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgport -lpgcommon -lssl -lcrypto -lgssapi_krb5 -lz -lreadline
-lcrypt -ldl -lm
VERSION = PostgreSQL 9.3beta2

postgres@fslaptop:~$ uname -a
Linux fslaptop 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1 x86_64 GNU/Linux


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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 9.3beta2 unrecognized node type in join alias vars when retrieving view definition
@ 2013-07-22 11:26  Andres Freund <andres@2ndquadrant.com>
  parent: Feike Steenbergen <feikesteenbergen@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Andres Freund @ 2013-07-22 11:26 UTC (permalink / raw)
  To: Feike Steenbergen <feikesteenbergen@gmail.com>; +Cc: pgsql-bugs

On 2013-07-22 13:22:21 +0200, Feike Steenbergen wrote:
> While testing the 9.3 beta I am unable to get the view definition for
> some views.
> Because of this I cannot use pg_dump to create a valid dump of the
> specified database.

Any chance you can post a schema only dump from 9.2 that reproduces the
problem when loaded into 9.3?

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 9.3beta2 unrecognized node type in join alias vars when retrieving view definition
@ 2013-07-22 13:10  Feike Steenbergen <feikesteenbergen@gmail.com>
  parent: Andres Freund <andres@2ndquadrant.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Feike Steenbergen @ 2013-07-22 13:10 UTC (permalink / raw)
  To: pgsql-bugs

the attached dump can be loaded and results in an error message when
retrieving the view definitions.

On Mon, Jul 22, 2013 at 2:04 PM, Feike Steenbergen
<feikesteenbergen@gmail.com> wrote:
> I can reproduce it with the attached dump.
>
>
>
> On Mon, Jul 22, 2013 at 1:26 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>> only

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

Attachments:

  unrecognized_node_type_bug-dump.sql (application/octet-stream, 8.4K) download

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: 9.3beta2 unrecognized node type in join alias vars when retrieving view definition
@ 2013-07-22 15:29  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Feike Steenbergen <feikesteenbergen@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2013-07-22 15:29 UTC (permalink / raw)
  To: Feike Steenbergen <feikesteenbergen@gmail.com>; +Cc: pgsql-bugs

Feike Steenbergen <feikesteenbergen@gmail.com> writes:
> the attached dump can be loaded and results in an error message when
> retrieving the view definitions.

Thanks for the test case.  It looks like I broke this in commit
2ffa740b, as a result of believing the comment in parsenodes.h that says
joinaliasvars lists can only contain Vars or COALESCE expressions :-(.
Will fix.

			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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2013-07-22 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-07-22 11:22 9.3beta2 unrecognized node type in join alias vars when retrieving view definition Feike Steenbergen <feikesteenbergen@gmail.com>
2013-07-22 11:26 ` Andres Freund <andres@2ndquadrant.com>
2013-07-22 13:10   ` Feike Steenbergen <feikesteenbergen@gmail.com>
2013-07-22 15:29     ` Tom Lane <tgl@sss.pgh.pa.us>

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