PostgreSQL schema extraction needs namespace
To extract a database schema from PostgreSQL, the fgldbsch tool now requires db namespace specification.
In version 2.50, the fgldbsch database schema extractor can only extract the
schema from a PostgreSQL database if you specify the -ow option.
PostgreSQL distinguishes table owners from table schemas (in other words table namespaces). The
real table namespace is defined by the pg_class.relnamespace column: it contains
the oid of a namespace defined in pg_namespace.
For PostgreSQL, the fgldbsch
-ow option will specify the namespace, instead of the owner of the table, because a
db user can create several schemas/namespaces and use the same table name in those different
namespaces. As result, filtering on user name can mix up table definitions from different
schemas/namespaces.
When extracting a database schema from a PostgreSQL database, you must specify the namespace of
tables with the -ow option. If no -ow option is specified and the
-un option is specified, fgldbsch will use the login name of the
-un option as namespace. If neither -ow, nor -up
options are specified, fgldbsch will use the PostgreSQL "public" namespace/schema
by default.
-ow
option:fgldbsch -db test1 -dv dbmpgs -un pgsuser -up fourjs -v -ow public