Thread: Data view - when query returns error

Data view - when query returns error

From
"Vjacheslav A."
Date:
Hi,<br /><br />in data view when a query returns error, message isn't displayed,<br />create 2 table table1 and table2,
thenopen table1 data view with filter: id=(SELECT table1_id FROM table2),<br />an empty grid appears, maybe better to
displayerror message (query has an error: "more than one row returned by a subquery used as an expression").<br />
(PGAdmin1.14.3, PostgreSQL 9.1.4, Windows XP x86)<br /><br /><br />here is sql for table and data:<br />CREATE TABLE
table1<br/>(<br />  id serial NOT NULL,<br />  description character varying(50),<br />  CONSTRAINT table1_pkey PRIMARY
KEY(id )<br /> )<br />WITH (<br />  OIDS=FALSE<br />);<br />CREATE TABLE table2<br />(<br />  id serial NOT NULL,<br
/> table1_id integer NOT NULL,<br />  description character varying(50),<br />  CONSTRAINT table2_pkey PRIMARY KEY (id
)<br/>)<br />WITH (<br />   OIDS=FALSE<br />);<br />INSERT INTO table1 (description) VALUES ('a');<br />INSERT INTO
table1(description) VALUES ('b');<br />INSERT INTO table1 (description) VALUES ('c');<br /><br />INSERT INTO table2
(table1_id,description) VALUES (1, 'aa');<br /> INSERT INTO table2 (table1_id, description) VALUES (2, 'bb');<br
/>INSERTINTO table2 (table1_id, description) VALUES (3, 'cc1');<br />INSERT INTO table2 (table1_id, description) VALUES
(4,'cc2');<br /><br /> 

Re: Data view - when query returns error

From
Guillaume Lelarge
Date:
On Wed, 2012-07-25 at 16:13 +0400, Vjacheslav A. wrote:
> Hi,
> 
> in data view when a query returns error, message isn't displayed,
> create 2 table table1 and table2, then open table1 data view with filter:
> id=(SELECT table1_id FROM table2),
> an empty grid appears, maybe better to display error message (query has an
> error: "more than one row returned by a subquery used as an expression").
> (PGAdmin 1.14.3, PostgreSQL 9.1.4, Windows XP x86)
> 
> 

Seems like a but to me. Added a ticket to work on this later.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com