Postgresql 'Not NULL' field properties not being honored by arcgis 10.1 clients?

04-22-2013 11:56 AM
New Contributor II
  Postgresql working okay, new (or copied) feature classes working okay.
  On existing postgresql tables, when I 'register with geodatabase', the postgresql 'Not NULL'  field properties are being ignored. Using ArcMAP, with a 'direct connect' database connection, all fields show 'Allow NULL values' = No??? Has anyone else seen this?

Note - postgresql's PGAdmin shows table structure as not being changed, it is the same as before arcmap looked at it.

As an experiment,  I created a table in arcmap using toolkit, added some fields with same name as in an existing postgresql table, setting 'Field IsNullable' and 'Field IsRequired' as wanted,  used the append tool (general) to add some data, and the new table works correctly (as expected).

ArcGIS 10.1 for Desktop, ArcSDE 10.1, ArcGIS for Server are all using SP1, data connection shows no geodatabase update needed.

Anyone else having trouble with existing postgresql tables using arcmap 10.1 sp1?
0 Kudos
1 Reply
Regular Contributor

  Look here: .

It is said that:

The geodatabase model is such that it will insert an empty value (numeric = 0, text = "") instead of a database NULL if, and only if, the field has a NOT NULL constraint on it.

You should try to create another constraint on that field. I recommend this: CHECK char_length(field) > number_of_characters. It works using AGS 10.1.1.


Adam Nicinski
0 Kudos