Menu

PostgreSQL support interest?

Kevin G.
2009-03-11
2013-05-30
  • Kevin G.

    Kevin G. - 2009-03-11

    I am interested in seeing whether others are interested in having PostgreSQL enjoying first-class support in upcoming PGV releases. 

    I personally prefer PG to MySQL because I am already familiar with it, because there is no charge for using it in commercial applications, and because I wish to eventually use the spatial features of PostGIS alongside PGV. 

    In 4.2 of PGV I notice that many features do not work with PostgreSQL, so I have started to fix them one-by-one, but out-of-the-box support is definitely preferable.  I know databases well, but am not a PHP guru and am far from a PGV guru.  Perhaps others have complementary skills that will help us vault PostgreSQL into first class citizenship in the PGV world.  Your thoughts?

     
    • Greg Roach

      Greg Roach - 2009-03-11

      Hi Kevin - yes we'd like to support Postgres.  Our aims are to support MySQL, SQLite, SQL-Server and PostgreSQL.  However, none of our developers use PG, so are not aware when incompatibilities creep in.

      So, if you let us know of any issues, we'll try to get them resolved for the next release.  Either raise a bug report, submit a patch, or just email the details.

       
    • Kevin G.

      Kevin G. - 2009-03-20

      1) The first set of problems involve the file functions_db.php.

      When I searched for Lists->Families beginning with <A> I got:

      ERROR:-1 DB Error: unknown error
      SQL:SELECT DISTINCT n_surn, n_surname, l_to FROM pgv_individuals JOIN pgv_name ON (i_id=n_id AND i_file=n_file) JOIN pgv_link ON (i_id=l_from AND i_file=l_file AND l_type='FAMS') WHERE n_file=1 AND n_type!='_MARNM' AND (n_sort ILIKE 'A%' OR n_sort ILIKE 'Á%' OR n_sort ILIKE 'À%' OR n_sort ILIKE 'Ä%' OR n_sort ILIKE 'Â%' OR n_sort ILIKE 'Ã%' OR n_sort ILIKE 'Å%' OR n_sort ILIKE 'Ǻ%' OR n_sort ILIKE 'Ā%' OR n_sort ILIKE 'Ă%' OR n_sort ILIKE 'Ą%' OR n_sort ILIKE 'Ǎ%') ORDER BY n_sort [nativecode=ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list]

      Fatal error: Call to undefined method DB_Error::fetchRow() in D:\KG_Files\PhpGedView\includes\functions\functions_db.php on line 725

      When I searched PhpGedView for Lists->Individuals whose last names begin with <G> I got:

      ERROR:-1 DB Error: unknown error
      SQL:SELECT DISTINCT n_surn, n_surname, n_id FROM pgv_individuals JOIN pgv_name ON (i_id=n_id AND i_file=n_file) WHERE n_file=1 AND n_type!='_MARNM' AND (n_sort ILIKE 'G%' OR n_sort ILIKE 'Äœ%' OR n_sort ILIKE 'Äž%' OR n_sort ILIKE 'Ä¢%' OR n_sort ILIKE 'Ä %') ORDER BY n_sort [nativecode=ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list]

      Fatal error: Call to undefined method DB_Error::fetchRow() in D:\KG_Files\PhpGedView\includes\functions\functions_db.php on line 627

      *********Solution**************
      From my Dell 8600 laptop when connected to my home network, the offending file can be found at

      :\KG_Files\PhpGedView\includes\functions\functions_db.php

      In that file, add n_sort to the end of the SELECT list in each of the five occurences of SQL that are of the form SELECT DISTINCT ... ORDER BY n_sort:

      function get_indilist_surns (line 627, v4.2, 31 January 2009)
      function get_famlist_surns function (line 688, v4.2, 31 January 2009)
      function get_indilist_indis (line 756, v4.2, 31 January 2009)
      function get_indi_list (line 1455, v4.2, 31 January 2009)
      function get_fam_list (line 1470, v4.2, 31 January 2009)

      2) The second file that needs to be changed is autocomplete.php.

      When I tried to change the Root Person ID in an Ancestry Chart I got:

      ERROR:-1 DB Error: unknown error
      SQL:SELECT DISTINCT 'INDI' AS type, i_id AS xref, i_file AS ged_id, i_gedcom AS gedrec, i_isdead, i_sex, n_list FROM pgv_individuals, pgv_name WHERE n_full ILIKE '%I4LASS="ERROR">ERROR:-1 DB ERROR: UNKNOWN ERROR
      SQL:SELECT DISTINCT ''INDI'' AS TYPE, I_ID AS XREF, I_FILE AS GED_ID, I_GEDCOM AS GEDREC, I_ISDEAD, I_SEX, N_LIST FROM PGV_INDIVIDUALS, PGV_NAME WHERE N_FULL ILIKE ''%I%'' AND I_ID=N_ID AND I_FILE=N_FILE AND I_FILE=2 ORDER BY N_SORT LIMIT 500 [NATIVECODE=ERROR: FOR SELECT DISTINCT, ORDER BY EXPRESSIONS MUST APPEAR IN SELECT LIST]

      Fatal error:  Call to undefined method DB_Error::fetchRow() in D:\KG_Files\PhpGedView\autocomplete.php on line 112**************Solution***************
      On my Dell 8600 laptop when connected to my home network, the offending file is D:\KG_Files\PhpGedView\autocomplete.php.

      Line 102 of autocomplete.php needs to have n_sort in the select list:
      "SELECT DISTINCT 'INDI' AS type, i_id AS xref, i_file AS ged_id, i_gedcom AS gedrec, i_isdead, i_sex, n_list, n_sort".

       
      • Greg Roach

        Greg Roach - 2009-03-24

        Hi Kevin,

        I've fixed these in SVN.

        If you find any others, could you let me know ASAP, as I'm hoping to get the 4.2.1 release issued next weekend.

        Greg

         
    • Kevin G.

      Kevin G. - 2009-03-24

      Greg, thank you for committing these changes and for the encouragement.

      Kevin

       
    • Brian Derr

      Brian Derr - 2009-05-27

      I'm a little late finding this but I am a dev and run Postgres. Email me or file bugs and assign them to me when you find errors with Postgres. I have been really busy these past several months with other commitments so I may be slow to respond, but I'll do my best. I came onto the project with the very plan of increasing support for Postgres but keep finding myself without the time to really delve into it.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.