Обсуждение: Keywords files
We haven't updated the keywords.cpp file for ages. In fact, so long ago that the instructions are incorrect. Recent versions of postgresql installs the list of keywords in kwlist.h. That requires PostgreSQL 8.4 or later. How old versions of the PostgreSQL *source* do we accept building against? Couldn't we just switch to using this include file instead, thus saying you need 8.4 or later to build? (it should still *run* against earlier versions just fine..) -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
On Wed, Dec 29, 2010 at 11:54 AM, Magnus Hagander <magnus@hagander.net> wrote: > We haven't updated the keywords.cpp file for ages. In fact, so long > ago that the instructions are incorrect. > > Recent versions of postgresql installs the list of keywords in > kwlist.h. That requires PostgreSQL 8.4 or later. > > How old versions of the PostgreSQL *source* do we accept building > against? Couldn't we just switch to using this include file instead, > thus saying you need 8.4 or later to build? (it should still *run* > against earlier versions just fine..) Iirc, we need 8.3 (or whichever version included pgconninfoparse). I'm fine with moving to using the new include file - iirc, most distros have an 8.4 build now. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Wed, Dec 29, 2010 at 14:55, Dave Page <dpage@pgadmin.org> wrote: > On Wed, Dec 29, 2010 at 11:54 AM, Magnus Hagander <magnus@hagander.net> wrote: >> We haven't updated the keywords.cpp file for ages. In fact, so long >> ago that the instructions are incorrect. >> >> Recent versions of postgresql installs the list of keywords in >> kwlist.h. That requires PostgreSQL 8.4 or later. >> >> How old versions of the PostgreSQL *source* do we accept building >> against? Couldn't we just switch to using this include file instead, >> thus saying you need 8.4 or later to build? (it should still *run* >> against earlier versions just fine..) > > Iirc, we need 8.3 (or whichever version included pgconninfoparse). I'm > fine with moving to using the new include file - iirc, most distros > have an 8.4 build now. That turned out to be a bit more work than I thought, mainly because there were EnterpriseDB and Greenplum keywords included in the pgadmin list - which was only documented in one of the two places where they occurred :-) Anyway, attached is a patch that I believe does this right. If you prefer an easier view, see https://github.com/mhagander/pgadmin3/compare/master...keywords Does this look ok? It does move the keyword definitions out of the header and into keywords.cpp - but they aren't used anywhere.. So in general, I'm fairly confident with it... -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Вложения
On Wed, Dec 29, 2010 at 4:40 PM, Magnus Hagander <magnus@hagander.net> wrote: > On Wed, Dec 29, 2010 at 14:55, Dave Page <dpage@pgadmin.org> wrote: >> On Wed, Dec 29, 2010 at 11:54 AM, Magnus Hagander <magnus@hagander.net> wrote: >>> We haven't updated the keywords.cpp file for ages. In fact, so long >>> ago that the instructions are incorrect. >>> >>> Recent versions of postgresql installs the list of keywords in >>> kwlist.h. That requires PostgreSQL 8.4 or later. >>> >>> How old versions of the PostgreSQL *source* do we accept building >>> against? Couldn't we just switch to using this include file instead, >>> thus saying you need 8.4 or later to build? (it should still *run* >>> against earlier versions just fine..) >> >> Iirc, we need 8.3 (or whichever version included pgconninfoparse). I'm >> fine with moving to using the new include file - iirc, most distros >> have an 8.4 build now. > > That turned out to be a bit more work than I thought, mainly because > there were EnterpriseDB and Greenplum keywords included in the pgadmin > list - which was only documented in one of the two places where they > occurred :-) > > Anyway, attached is a patch that I believe does this right. If you > prefer an easier view, see > https://github.com/mhagander/pgadmin3/compare/master...keywords > > Does this look ok? > > It does move the keyword definitions out of the header and into > keywords.cpp - but they aren't used anywhere.. So in general, I'm > fairly confident with it... I don't see any obvious problems. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On Wed, Dec 29, 2010 at 20:27, Dave Page <dpage@pgadmin.org> wrote: > On Wed, Dec 29, 2010 at 4:40 PM, Magnus Hagander <magnus@hagander.net> wrote: >> On Wed, Dec 29, 2010 at 14:55, Dave Page <dpage@pgadmin.org> wrote: >>> On Wed, Dec 29, 2010 at 11:54 AM, Magnus Hagander <magnus@hagander.net> wrote: >>>> We haven't updated the keywords.cpp file for ages. In fact, so long >>>> ago that the instructions are incorrect. >>>> >>>> Recent versions of postgresql installs the list of keywords in >>>> kwlist.h. That requires PostgreSQL 8.4 or later. >>>> >>>> How old versions of the PostgreSQL *source* do we accept building >>>> against? Couldn't we just switch to using this include file instead, >>>> thus saying you need 8.4 or later to build? (it should still *run* >>>> against earlier versions just fine..) >>> >>> Iirc, we need 8.3 (or whichever version included pgconninfoparse). I'm >>> fine with moving to using the new include file - iirc, most distros >>> have an 8.4 build now. >> >> That turned out to be a bit more work than I thought, mainly because >> there were EnterpriseDB and Greenplum keywords included in the pgadmin >> list - which was only documented in one of the two places where they >> occurred :-) >> >> Anyway, attached is a patch that I believe does this right. If you >> prefer an easier view, see >> https://github.com/mhagander/pgadmin3/compare/master...keywords >> >> Does this look ok? >> >> It does move the keyword definitions out of the header and into >> keywords.cpp - but they aren't used anywhere.. So in general, I'm >> fairly confident with it... > > I don't see any obvious problems. If you didn't notice already ;), I've now applied this version. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/