Skip site navigation (1) Skip section navigation (2)

Reverse engineering problem on views

From: laurie(dot)burrow(at)powerconv(dot)alstom(dot)com
To: pgadmin-support(at)postgresql(dot)org
Subject: Reverse engineering problem on views
Date: 2004-12-06 13:25:09
Message-ID: OF72DC7EB4.AADD76C8-ON80256F62.0046FD3D-80256F62.004AD0F9@transport.alstom.com (view raw or flat)
Thread:
Lists: pgadmin-supportpgsql-patches
Hi,

I have noticed this possible bug:

Using pgadmin V1.2.0 on Windows 2000 Desktop to a remote Windows 2000
Server Postgres V7.4.1 running on cygwin and to Postgres V8Beta2

Created this view.

CREATE OR REPLACE VIEW public.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

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.

There seems to be an error caused by the reverse engineering adding the
extra bracketting on the left join clauses. If the extra brackets are
deleted the SQLis executed correctly.

Any suggestions?

Great work pgadmin, really enjoy using it.

Regards
Laurie Burrow



:.________________
CONFIDENTIALITY : This  e-mail  and  any attachments are confidential and
may be privileged. If  you are not a named recipient, please notify the
sender immediately and do not disclose the contents to another person, use
it for any purpose or store or copy the information in any medium.



Responses

pgadmin-support by date

Next:From: CheetahDate: 2004-12-07 00:52:24
Subject: Re: using slony with pgadmin
Previous:From: Loy WolframDate: 2004-12-06 09:53:24
Subject: SQL-Scripts aren't executed correctly from within pgAdminIII-Query tool

pgsql-patches by date

Next:From: Tom LaneDate: 2004-12-06 15:13:39
Subject: Re: Preliminary patch for on-the-fly relpages/reltuples estimation
Previous:From: Markus BertheauDate: 2004-12-06 10:14:41
Subject: Re: Preliminary patch for on-the-fly relpages/reltuples

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group