Search posterous

Search all posts and users. Type a name, type a favorite song title, whatever! See what comes up.
  

More posterous blogs











More recommended blogs »

Here are posterous posts filed under postgres...

Alex says...

I think its new in PostgreSQL 8.4, there is a new field type called citext, which stands for case insensitive text.  Currently on Ubuntu 9.10 its in the PostgreSQL contrib package, which often serves as a testbed for features before they are adopted into PostgreSQL proper.

Using citext ensures that all comparisons are case insensitive, which includes referential integrity on inserts, updates and deletes, and SQL queries for lookups for example, which I think will work well for those fields that should always be compared case insensitive.

Although citext (and probably many other modules) are not listed on the contrib page, they are included, you can see them in the complete file list.

Steps to install on Ubuntu 9.10 (Karmic Koala):

# Install the contrib package
sudo apt-get install postgresql-contrib-8.4
# Add the citext module to a database of your choice
psql [username] -d [databaseName] -f /usr/share/postgresql/8.4/contrib/citext.sql

Where in this case /usr/share/postgresql/8.4 is the PostgreSQL SHARE_DIR folder.

Now you can use the field citext instead of text.  If you'd like to use citext on Ubuntu 9.04 Jaunty (which only includes PostgreSQL 8.3), then check out Mark's post about installing PostgreSQL 8.4 on Ubuntu 9.04.

Filed under: postgres

PostgreSQL
http://www.postgresql.org/
Downloads for Windows, Linux, Mac, ...
http://www.postgresql.org/download/
 
PostGIS
PostGIS adds support for geographic objects to the PostgreSQL object-relational database. In effect, PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a backend spatial database for geographic information systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS follows the OpenGIS "Simple Features Specification for SQL" and has been certified as compliant with the "Types and Functions" profile.
http://postgis.refractions.net/

Cheatsheet
http://www.bostongis.com/postgis_quickguide.bqg?outputformat=PDF
 
Hibernate Spatial
Hibernate Spatial is a generic extension to Hibernate for handling geographic data. Hibernate Spatial is open source and licensed, like Hibernate, under the LGPL license.
 
Hibernate Spatial allows you to deal with geographic data in a standardized way. It abstracts away from the specific way your database supports geographic data, and provides a standardized, cross-database interface to geographic data storage and query functions.
 
Hibernate Spatial supports most of the functions of the OGC Simple Feature Specification. Supported databases are: Oracle 10g/11g, Postgresql/Postgis, and MySQL.
http://www.hibernatespatial.org/
 
Hibernate Spatial for PostGIS
http://www.hibernatespatial.org/hibernate-spatial-postgis/source-repository.htm
 
Grails and PostGIS
http://blog.mollusca.ch/2008/10/4/grails-spatial-data-postgis
http://blog.mollusca.ch/2009/5/11/grails-spatial-data-2-0
http://blog.mollusca.ch/2008/10/16/calling-stored-procedures-from-grails
http://www.nabble.com/grails-and-postgis-td19666057.html
 
 
 JTS Topology Suite
 
The JTS Topology Suite is an API of 2D spatial predicates and functions. It has the following design goals:
 
  * JTS conforms to the Simple Features Specification for SQL published by the Open GIS Consortium
  * JTS provides a complete, consistent, robust implementation of fundamental 2D spatial algorithms
  * JTS is fast enough for production use
  * JTS is written in 100% pure JavaTM
  * JTS is open source (under the LGPL license)
http://www.vividsolutions.com/jts/jtshome.htm

Filed under: postgres