Skip to main content
Open

Support multiple column / field constraints for Postgres Reader and Writer

Related products:Integrations
  • September 20, 2018
  • 2 replies
  • 63 views

stalknecht
Contributor
Forum|alt.badge.img+22

It looks like that either the Postgres Reader and Writer doesn't support multiple column / field constraints. See discussion:

https://knowledge.safe.com/questions/78765/multiple-column-key-constraint-is-wrong-interprete.html?childToView=78768#answer-78768

If you ask me it's a shortcomming that should be fixed!

2 replies

  • December 1, 2023

Please add multiple column/field constraint support also for MS SQL and Azure SQL database writers


PierreAtSafe
Safer
Forum|alt.badge.img+8

Hello!

I talk about this feature with our Database development team. As you know, FME doesn’t support creating composite constraints for indices. The workaround is to use SQL to either:

  1. Create the table with the desired constraints before writing
  2. if you prefer, add them after writing, if you’re confident the written data will be compliant.

A good way to do this is to use SQL to Run Before Write on your writer, and then select Table Handle = Use Existing Existing Table in the writer feature type. If you need to use more than one SQL statement to do this, read the doc for FME_SQL_DELIMITER