[gdal-dev] Postgresql driver ability to add constraints

Frank Warmerdam warmerdam at pobox.com
Wed Nov 3 09:30:07 EDT 2010

On Wed, Nov 3, 2010 at 9:23 AM, Matthieu Rigal <rigal at rapideye.de> wrote:
> Hi guys,
> I was checking and I did not found a proper way for now to add a unique or not
> null constraints to columns of a layer created/edited by OGR.
> If I am wrong, please correct me.
> Else, as I saw that a big refactoring of the PgSQL/PostGIS is planned/done for
> the 1.8 version, this may be added, as it is quite widely used properties...


Why not add such constraints via ExecuteSQL() after creating the layer?
I'm not keen on making constraints a first-class OGR data model concept
for a variety of reasons.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the gdal-dev mailing list