diff options
Diffstat (limited to 'odb/relational/pgsql')
-rw-r--r-- | odb/relational/pgsql/context.cxx | 2 | ||||
-rw-r--r-- | odb/relational/pgsql/schema.cxx | 12 | ||||
-rw-r--r-- | odb/relational/pgsql/source.cxx | 5 |
3 files changed, 6 insertions, 13 deletions
diff --git a/odb/relational/pgsql/context.cxx b/odb/relational/pgsql/context.cxx index 391c65e..0f68281 100644 --- a/odb/relational/pgsql/context.cxx +++ b/odb/relational/pgsql/context.cxx @@ -84,6 +84,8 @@ namespace relational insert_send_auto_id = false; delay_freeing_statement_result = false; need_image_clone = false; + global_index = true; + global_fkey = false; data_->bind_vector_ = "pgsql::bind*"; data_->truncated_vector_ = "bool*"; diff --git a/odb/relational/pgsql/schema.cxx b/odb/relational/pgsql/schema.cxx index 5574bdb..b0d4f50 100644 --- a/odb/relational/pgsql/schema.cxx +++ b/odb/relational/pgsql/schema.cxx @@ -170,18 +170,6 @@ namespace relational { create_index (base const& x): base (x) {} - virtual string - name (sema_rel::index& in) - { - // In PostgreSQL, index names are database-global. Make them unique - // by prefixing the index name with table name. Note, however, that - // they cannot be qualified with the schema name. - // - return quote_id ( - static_cast<sema_rel::table&> (in.scope ()).name ().uname () - + "_" + in.name ()); - } - virtual void create (sema_rel::index& in) { diff --git a/odb/relational/pgsql/source.cxx b/odb/relational/pgsql/source.cxx index 332e25b..e106758 100644 --- a/odb/relational/pgsql/source.cxx +++ b/odb/relational/pgsql/source.cxx @@ -618,9 +618,12 @@ namespace relational if (id != 0 && !poly_derived && id->count ("auto")) { + // Top-level auto id. + // os << endl << strlit (" RETURNING " + - convert_from (column_qname (*id), *id)); + convert_from (column_qname (*id, column_prefix ()), + *id)); } } |