[Koha-devel] Adding support for PostgreSQL, no new MySQLisms, please

Ian Walls koha.sekjal at gmail.com
Fri Mar 23 17:23:46 CET 2012


According to rule SQL6 of our Coding Guidelines (
http://wiki.koha-community.org/wiki/Coding_Guidelines#Database), backquotes
are not acceptable, as they are a MySQL-ism.  Part of the duty of QA is to
verify that the coding guidelines are met, so it is reasonable to say that
such markings *should* be stripped out of any new incoming patches.  As to
whether having them results in a "Failed QA" or a followup/rebased patch
from a QA team member is up to the discretion and availability of that team
member.

I know I've been a little lax with this one, as we're still rife with
backquotes in our SQL, and one or two more lines aren't going to add any
significant additional work to our cleanup efforts.  My primary interest is
consistency, because it makes for easier to read and maintain code.  Once
we have done the majority of this cleanup, I'll become stricter about
backquotes.

The ultimate goal here, to the best of my understanding, is database
independence, of which PostgreSQL support is a consequence.  We should do
our best to adhere to standards in all regards; by following SQL standard
practices, we give ourselves more flexibility and adaptability, and
decrease the overall potential workload throughout time.

Cheers,


-Ian

2012/3/23 Chris Nighswonger <cnighswonger at foundations.edu>

> Hi Marc,
>
> On Fri, Mar 23, 2012 at 6:12 AM, Marc Balmer <marc at msys.ch> wrote:
>
>> Dear Koha-Devels,
>>
>> during the Marseille Hackfest 2012 I started together with Stephane and
>> Christophe from BibLibre to add support for the PostgreSQL database.
>> The ultimate goal of this work is that Koha can run on a PostgreSQL
>> server as as good as it does now on a MySQL server.
>>
>> This mostly boils down to removing the MySQLisms in the current code,
>> which I am currently doing.  The collect-all-activity bug for this is
>> 7365, it holds dependencies to the individual bugs like 7802, 7806 etc.
>> (more to come, obviously).  There is also a wiki page
>> wiki.koha-community/wiki/PostgreSQL which I update frequently.
>>
>>
> This is good work. I attempted to start this years ago, but soon dropped
> it due to my schedule.
>
>
>> This work also means that you must not add new MySQLisms in new code.
>>
>
> ...
>
>
>>
>> And please be advised that adding MySQLisms in new code will fail in QA.
>>
>>
> While I agree with this proposition, we are not in the habit as a
> community of individual developers (or even groups of developers)
> "dictating" coding practices. The accepted procedure to follow is to
> present the change/addition via the list to solicit discussion and obtain
> consensus on the proposition.
>
> Furthermore, what "will" and "will not" pass QA is subject to
> the discretion of the community appointed QA manager, not other individuals.
>
> So I would suggest that we solicit some comment on this to give the
> community the opportunity to express its desire.
>
> Kind Regards,
> Chris
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20120323/ed2e539e/attachment.htm>


More information about the Koha-devel mailing list