This adds a new type QualifiedName for named PostgreSQL objects (tables, views, functions and sequences) that can optionally be qualified by a schema. Previously only TableSchema could be qualified in this way.
QualifiedName has an IsString instance so the common case (where the schema is Nothing) doesn't have to care about schemas (if OverloadedStrings is enabled).
This also refactors TableSchema to use QualifiedName for its name field and drops its schema field.
Thanks to @elldritch for the bug report and the inspiration.
This adds a new type
QualifiedName
for named PostgreSQL objects (tables, views, functions and sequences) that can optionally be qualified by a schema. Previously onlyTableSchema
could be qualified in this way.QualifiedName
has anIsString
instance so the common case (where the schema isNothing
) doesn't have to care about schemas (ifOverloadedStrings
is enabled).This also refactors
TableSchema
to useQualifiedName
for itsname
field and drops itsschema
field.Thanks to @elldritch for the bug report and the inspiration.