Re: Damien Clochard 2019-03-17 <2bc470194b4837c1f733a4e05f569bc6(at)dalibo(dot)info>
> How do you guys deal with this ? It seems that a lot of GUI tools are able
> to "export the table structure".... Is there an extension somewhere to do
> that ? Is it possible to write i in pure SQL ? If yes, there anybody here
> interested in joining forces to build a shared export function ?
IMHO the cleanest way would be to move all of that into the server.
There are already functions like pg_getindexdef() which pg_dump can
(could?) use. But of course that won't fix the problem for existing PG
versions.
For a medium-term solution, a plpgsql extension (or the client-side
equivalent) seems like the best way.
Christoph