PostgreSQL: Set owners for sequences
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 9 Apr 2018 15:57:27 +0000 (11:57 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 9 Apr 2018 16:05:29 +0000 (12:05 -0400)
commit6318430fc8b165275fc3c1f0b77648a920f57780
treeaa650d9bfa83b9bc3cca8dc02a1c7c2df1800585
parent27ae81a82697e26b466eca6e0095827b5a996f50
PostgreSQL: Set owners for sequences

PostgreSQL allows setting an "owner" column for a sequence, so if that
column is dropped then the sequence will be dropped too. We should
certainly take advantage of that when creating duplicate tables for unit
testing (particularly when $temporary is false), and we may as well do
it for our permanent tables too.

Change-Id: I4822ac33298e3f3ef59f4372a24aa0866a6e66ae
includes/installer/PostgresUpdater.php
includes/libs/rdbms/database/DatabasePostgres.php
maintenance/postgres/tables.sql