[EMAIL PROTECTED] 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
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html