Re: [HACKERS] is it possible to use LIMIT and INTERSECT ?
От | Oleg Bartunov |
---|---|
Тема | Re: [HACKERS] is it possible to use LIMIT and INTERSECT ? |
Дата | |
Msg-id | Pine.GSO.3.96.SK.991019092317.8622I-100000@ra обсуждение исходный текст |
Ответ на | Re: [HACKERS] is it possible to use LIMIT and INTERSECT ? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] is it possible to use LIMIT and INTERSECT ?
|
Список | pgsql-hackers |
Thanks Tom, I synced REL6_5 tree, compile, install but still query select a.msg_id, c.status_set_date, c.title from Message_Keyword_map a, messages c, keywords d where c.status_id=1 and d.name ~* 'sun' and a.key_id=d.key_id and c.msg_id=a.msg_id intersect select a.msg_id, a.status_set_date, a.title from messages a where a.status_id = 1 and a.title ~* 'sun' limit 10; produces more than 10 rows ! Regards, Oleg On Tue, 19 Oct 1999, Tom Lane wrote: > Date: Tue, 19 Oct 1999 00:42:08 -0400 > From: Tom Lane <tgl@sss.pgh.pa.us> > To: Oleg Bartunov <oleg@sai.msu.su>, pgsql-hackers@postgreSQL.org > Subject: Re: [HACKERS] is it possible to use LIMIT and INTERSECT ? > > I wrote: > > Hmm. It seemed to work as expected in current --- maybe there is > > another bug still lurking in 6.5.*. I'll look when I get a chance. > > Yup, this change that was already in current is also needed: > > *** src/backend/parser/gram.y.orig Mon Oct 18 23:59:35 1999 > --- src/backend/parser/gram.y Mon Oct 18 23:55:18 1999 > *************** > *** 2768,2773 **** > --- 2768,2775 ---- > /* finally attach the sort clause */ > first_select->sortClause = $2; > first_select->forUpdate = $3; > + first_select->limitOffset = nth(0, $4); > + first_select->limitCount = nth(1, $4); > $$ = (Node *)first_select; > } > if (((SelectStmt *)$$)->forUpdate != NULL && QueryIsRule) > > > > I have updated both current and REL6_5 branches. > > regards, tom lane > > ************ > _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
В списке pgsql-hackers по дате отправления: