From dd3f1958ace6996b4db38f1de88aacdb2c660632 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 20 Feb 2020 12:55:06 +0100 Subject: [PATCH] =?utf8?q?Unterst=C3=BCtzung=20f=C3=BCr=20PostgreSQL=2012?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Das Format von `pg_attrdef` wurde in PostgreSQL 12 deutlich geändert; die Spalte `adsrc` gibt es nicht mehr. Für den Auth-Code ist allerdings nur interessant, ob es Spalte X in Tabelle Y bereits gibt. Also auch nur genau diese Informationen auslesen. --- SL/Auth/ColumnInformation.pm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/SL/Auth/ColumnInformation.pm b/SL/Auth/ColumnInformation.pm index 64b600dd1..024b0cf41 100644 --- a/SL/Auth/ColumnInformation.pm +++ b/SL/Auth/ColumnInformation.pm @@ -27,16 +27,14 @@ sub _fetch { foreach my $table (qw(session session_content)) { my $query = < 0) - AND NOT a.attisdropped - ORDER BY a.attnum + SELECT attname + FROM pg_attribute + WHERE (attrelid = 'auth.${table}'::regclass) + AND (attnum > 0) + AND NOT attisdropped SQL - $self->{info}->{$table} = { selectall_as_map($::form, $self->{auth}->dbconnect, $query, 'attname', [ qw(format_type adsrc attnotnull) ]) }; + $self->{info}->{$table} = { selectall_as_map($::form, $self->{auth}->dbconnect, $query, 'attname', [ qw(attname) ]) }; } return $self; -- 2.20.1