Re: [HACKERS] A view just stopped working out of the blue... - Mailing list pgsql-hackers

From wieck@debis.com (Jan Wieck)
Subject Re: [HACKERS] A view just stopped working out of the blue...
Date
Msg-id m11v3tv-0003kGC@orion.SAPserv.Hamburg.dsh.de
Whole thread Raw
In response to A view just stopped working out of the blue...  (Don Baccus <dhogaza@pacifier.com>)
List pgsql-hackers
Don Baccus wrote:

> This has been working for months, just fine.  I've been porting over a bunch
> more stuff from Oracle to this Postgres-based system, and bam!  Now any
> select from the view dies with:
>
> unknown node tag 600 in apply_RIR_view

    Node tag 600 is T_Query.

> I've tried dropping and rebuilding the table and view in a test database
> and the problem remains.  I recall running into problems with other
> operations many moons ago, where a particular node type wasn't being
> handled by a particular operator (the ones I'd seen previously were
> fixed by the excellent 6.5.* versions).
>
> Is this a similar case?  I may do a little digging myself tonight, but
> thought I'd ask to see if this rings a bell with anyone.  It's a bit
> strange because this view's been working great on this table for so
> long.  I added a couple of extra columns to the table recently but
> the view worked immediately afterwards.  The stuff I've been porting
> creates views willy-nilly and it's almost like there's an interaction
> taking place, but that doesn't seem right.
>
> It fails in the same manner if I simply declare the view as:
>
> create view users_alertable as select * from users;

    I  assume  the column with the IN constraint is either new or
    changed recently. Seems the system generates  some  subselect
    for that and the rewriter is unable to handle this case.

    I  don't have the time to tackle that, just some hint to push
    you into the right direction.

    Be careful if  hacking  inside  the  rewriter,  it's  a  very
    sensitive area!


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#========================================= wieck@debis.com (Jan Wieck) #

pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: A view just stopped working out of the blue...
Next
From: wieck@debis.com (Jan Wieck)
Date:
Subject: FOREIGN KEY again