514 |
postgis 0.7.5 $datadir/contrib/postgis.sql |
postgis 0.7.5 $datadir/contrib/postgis.sql |
515 |
postgis 0.8.1 $datadir/postgis.sql |
postgis 0.8.1 $datadir/postgis.sql |
516 |
postgis 1.0.0-rc1 $datadir/lwpostgis.sql |
postgis 1.0.0-rc1 $datadir/lwpostgis.sql |
517 |
|
postgis 1.0.0-rc4 $datadir/contrib/lwpostgis.sql |
518 |
|
|
519 |
To support both versions, we look in both places and return the |
To support both versions, we look in both places and return the |
520 |
first one found (looking under contrib first). If the file is not |
first one found (looking under contrib first). If the file is not |
524 |
datadir = os.path.join(bindir, "..", "share", "postgresql") |
datadir = os.path.join(bindir, "..", "share", "postgresql") |
525 |
for filename in [os.path.join(datadir, "contrib", "postgis.sql"), |
for filename in [os.path.join(datadir, "contrib", "postgis.sql"), |
526 |
os.path.join(datadir, "postgis.sql"), |
os.path.join(datadir, "postgis.sql"), |
527 |
os.path.join(datadir, "lwpostgis.sql")]: |
os.path.join(datadir, "lwpostgis.sql"), |
528 |
|
os.path.join(datadir, "contrib", "lwpostgis.sql")]: |
529 |
if os.path.exists(filename): |
if os.path.exists(filename): |
530 |
return filename |
return filename |
531 |
|
|