Re: [Koha-devel] [Koha-patches] [PATCH] BUG-2393: ENHANCEMENT: SearchMember() uses "cardnumber%" wildcard - if other search-types fail
(Note: moved to koha-devel from patches) Hi Paul - On Fri, Jul 25, 2008 at 1:57 AM, paul POULAIN <paul.poulain@biblibre.com> wrote:
Please note that the SQL "LIMIT" pragma is mySQL specific. So it must be avoided.
Is this a guideline we should be currently following? I'm not asking because i disagree with it, in fact I think it's an admirable goal. I just hadn't seen it documented anywhere like the developers' wiki, and I fear that I've probably been failing to abide by it. I think there are plenty of uses of "LIMIT" in the code, and if this is something we're working towards, I'll start eliminating them in any code I work on. Thanks! -Andy
On Fri, Jul 25, 2008 at 1:57 AM, paul POULAIN <paul.poulain@biblibre.com> wrote:
Please note that the SQL "LIMIT" pragma is mySQL specific. So it must be avoided.
Paul, I'm not sure what gave you that impression. Maybe you are thinking of Oracle, where a "rownum" construction is used. (But not much I'm going to do is going to get us near running on Oracle.) In practice, the only other DB we've even seen work to support is postgres, so it should be sufficient to show that it supports limit clauses. It does: http://www.postgresql.org/docs/7/static/sql-select.htm Pg supports OFFSET also. I suspect Koha will move to a broader DBI management interface before Oracle is fully supported. In other words, I wouldn't change any queries for it, and certainly not for 3.0. I think there are plenty of uses of "LIMIT" in the code, and if this
is something we're working towards, I'll start eliminating them in any code I work on.
Please don't, they are there for good reason! --joe
Joe Atzberger a écrit :
On Fri, Jul 25, 2008 at 1:57 AM, paul POULAIN <paul.poulain@biblibre.com <mailto:paul.poulain@biblibre.com>> wrote: > Please note that the SQL "LIMIT" pragma is mySQL specific. So it must be avoided.
Paul, I'm not sure what gave you that impression. Maybe you are thinking of Oracle, where a "rownum" construction is used. (But not much I'm going to do is going to get us near running on Oracle.)
I never used Oracle, so I was not thinking about it ;-)
In practice, the only other DB we've even seen work to support is postgres, so it should be sufficient to show that it supports limit clauses. It does: http://www.postgresql.org/docs/7/static/sql-select.htm
OK, I didn't knew that. However, afaik, LIMIT is not SQL92 compliant, but I can live with that ;-) -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc NOUVEAU TELEPHONE : 04 91 81 35 08
participants (3)
-
Andrew Moore -
Joe Atzberger -
Paul POULAIN