[postgis-users] steps in creating a new database

Vasile Cristian Stan vasileestan at gmail.com
Fri Apr 9 03:10:47 PDT 2010


Hi all,


I try to create a new postgis database on Ubuntu, and I'm quite confused
about the steps in creating a database.


Creating database:
# createdb -T [template] [name_of_the_database]

- what are the use [-T] and [template] in this line
- I can create my own template? for example: # createdb -T [general_data]
[world]

  Adding plpsql language to the database:

  # createlang plpgsql [database]

  # psql -d [database] -f /usr/share/postgresql/8.4/contrib/postgis.sql

# psql -d [database] -f
/usr/share/postgresql/8.4/contrib/spatial_ref_sys.sql

# psql -d [database] -c"select postgis_lib_version();"


- is plpgsql a condition in creating a geodatabase
- what's happening if I don't add this line # psql -d [database] -f
/usr/share/postgresql/8.4/contrib/spatial_ref_sys.sql

- This are the complete steps in creating a spatial database?
- Where i can find more information regarding this subject?


Thank you,
Cristian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100409/e73bfb2f/attachment.html>


More information about the postgis-users mailing list