Commit 9166c436 authored by webchick's avatar webchick
Browse files

Issue #2443681 by daffie, mradcliffe, bzrudi71: PostgreSQL: Fix user\Tests\UserAccountLinksTest

parent a74e19a1
......@@ -109,12 +109,24 @@ public function queryTableInformation($table) {
try {
// Check if the table information exists in the PostgreSQL metadata.
$table_information_exists = (bool) $this->connection->query("SELECT 1 FROM pg_class WHERE relname = :table", array(':table' => $table_name))->fetchField();
// If the table information does not yet exist in the PostgreSQL
// metadata, then return the default table information here, so that it
// will not be cached.
if (!$table_information_exists) {
return $table_information;
else {
$result = $this->connection->query("SELECT column_name, data_type, column_default FROM information_schema.columns WHERE table_schema = :schema AND table_name = :table AND (data_type = 'bytea' OR (numeric_precision IS NOT NULL AND column_default LIKE :default))", array(
':schema' => $schema,
':table' => $table_name,
':default' => '%nextval%',
catch (\Exception $e) {
throw $e;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment