Skip to main content

I want to write lines into an existing PostGIS table, which has default values for most of the columns. With FME PostGIS Writer, when executing the process, I have errors returning (in french):
Bulk copy failed on table 'XXX' using delimiter ':'. Error was 'ERREUR:  une valeur NULL viole la contrainte NOT NULL de la colonne « YYY» dans la relation « XXX »

 

I would like to use the Postgres default values for these NOT NULL columns, but I cannot find the way to do it.

I use FME Form 2023.2

For a “quick fix”, I used SQLExecutor to execute INSERT with selected fields, and use the default values from Postgres when these are not provided in the INSERT. That does the job.

If anyone has a better idea to use the Postgis Writer, this would always be interesting.


Try removing (deleting) the relevant attributes from the writer.


I think @david_r is right!

 

Default values ​​are used by Postgres only if no data is inserted in the relevant fields.

 

If you leave these attributes even without specifying a value, postgres will translate it as a NULL value insertion, which will override the default value!

 

Reply