Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org> writes:
> When I run that function it seems the foreign keys are not properly
> updated and the data ends up in a mess.
Yeah? Could we see an actual example of what you're talking about?
And which PG version is this?
regards, tom lane