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

subselects & views

From: Brett McCormick <pgsql(at)chicken(dot)org>
To: pgsql-hackers(at)hub(dot)org
Subject: subselects & views
Date: 1998-07-23 02:05:45
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
select max(ccorderseq) from ccorder;
(1 row)

icv=> select * From the_view where ccorderseq = 603;

[ I get the row back ]

select * From the_view where ccorderseq = (select max(ccorderseq) from ccorder);

I don't get the row back.  nothing has changed, the max value is still
the same.  when I write out the view as a select, the subquery works
and I get the row.

if it makes much of a difference the view is doing a "glob" query (of
a parent and all children, i.e. select from table*)


pgsql-hackers by date

Next:From: Kevin CousinsDate: 1998-07-23 02:55:49
Subject: Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]
Previous:From: Bruce MomjianDate: 1998-07-23 00:40:58
Subject: Re: [HACKERS] Efficiency again...

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