Re: deparsing utility commands - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: deparsing utility commands
Date
Msg-id 55C261FD.9020201@BlueTreble.com
Whole thread Raw
In response to Re: deparsing utility commands  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
Responses Re: deparsing utility commands  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 7/31/15 8:45 AM, Shulgin, Oleksandr wrote:
> While running deparsecheck suite I'm getting a number of oddly looking
> errors:
>
> WARNING:  state: 42883 errm: operator does not exist: pg_catalog.oid =
> pg_catalog.oid
>
> This is caused by deparsing create view, e.g.:
>
> STATEMENT:  create view v1 as select * from t1 ;
> ERROR:  operator does not exist: pg_catalog.oid = pg_catalog.oid at
> character 52
> HINT:  No operator matches the given name and argument type(s). You
> might need to add explicit type casts.
> QUERY:  SELECT * FROM pg_catalog.pg_rewrite WHERE ev_class = $1 AND
> rulename = $2
> CONTEXT:  PL/pgSQL function test_ddl_deparse() line 1 at FOR over SELECT
> rows
>
> The pg_rewrite query comes from ruleutils.c, while ddl_deparse.c calls
> it through pg_get_viewdef_internal() but don't understand how is it
> different from e.g., select pg_get_viewdef(...), and that last one is
> not affected.

I'm not sure what test_ddl_deparse is doing, is that where the oid = oid 
is coming from?

It might be enlightening to replace = with OPERATOR(pg_catalog.=) and 
see if that works.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Andreas Seltenreich
Date:
Subject: Re: [sqlsmith] Failed assertion in joinrels.c
Next
From: Petr Jelinek
Date:
Subject: Re: [DOCS] max_worker_processes on the standby