Re: Reverse engineering problem on views - Mailing list pgadmin-support

From Andreas Pflug
Subject Re: Reverse engineering problem on views
Date
Msg-id 41B989B7.9060204@pse-consulting.de
Whole thread Raw
In response to Reverse engineering problem on views  (laurie.burrow@powerconv.alstom.com)
List pgadmin-support
laurie.burrow@powerconv.alstom.com wrote:

> Retrieved view into SQL dialog window using copy SQL option
> 
> This gave
> 
> -- View: "test_view"
> 
> -- DROP VIEW test_view;
> 
> CREATE OR REPLACE VIEW test_view AS
>  SELECT or0.actvle AS treename
>    FROM gnrcitm g
>    LEFT JOIN ((gnrcitmothrref g0
>    JOIN other_ref r0 ON g0.idntfyrefid = r0.idntfyrefid AND
> r0.catnmeclssid::text = 'Tree Name'::text) or0) ON g.gnrcitmid =
> or0.gnrcitmid;
> 
> When executed this gives  ERROR:  syntax error at or near ")" at character
> 273.

I can confirm this; the backend's pg_get_viewdef will give these 
parentheses too much with pretty-print option=true. Quite awkward, since 
this option should *suppress* additional parens...

I'll check the backend code.


Regards,
Andreas


pgadmin-support by date:

Previous
From: Raphaël Enrici
Date:
Subject: pgAdmin III 1.2.0 Debian packages available
Next
From: "Dave Page"
Date:
Subject: Re: No drop object confirmation