Skip to content

Commit

Permalink
Stop using adsrc column
Browse files Browse the repository at this point in the history
Was removed in V12, invalid since V8.

See https://www.postgresql.org/docs/8.3/catalog-pg-attrdef.html
  • Loading branch information
mikebski authored and vrana committed Nov 11, 2019
1 parent 6ae81cd commit c7550bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion adminer/drivers/pgsql.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ function fields($table) {

$identity_column = min_version(10) ? "(a.attidentity = 'd')::int" : '0';

foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, d.adsrc AS default, a.attnotnull::int, col_description(c.oid, a.attnum) AS comment, $identity_column AS identity
foreach (get_rows("SELECT a.attname AS field, format_type(a.atttypid, a.atttypmod) AS full_type, pg_get_expr(d.adbin, d.adrelid) AS default, a.attnotnull::int, col_description(c.oid, a.attnum) AS comment, $identity_column AS identity
FROM pg_class c
JOIN pg_namespace n ON c.relnamespace = n.oid
JOIN pg_attribute a ON c.oid = a.attrelid
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Adminer 4.7.5-dev:
Add id="" to cells with failed inline edit (bug #708)
PostgreSQL: Fix getting default value in PostgreSQL 12 (bug #719)
PostgreSQL, Oracle: Set schema for EXPLAIN queries in SQL command (bug #706)
ClickHouse: SQL command
Swedish translation
Expand Down

0 comments on commit c7550bf

Please sign in to comment.