Skip to content
Permalink
Browse files

postgres provider: fix retrieval of default values from other schemes (

…fixes #12447)
  • Loading branch information
jef-n committed Mar 25, 2015
1 parent e21010c commit 581d7f8e70c5baab95a85308c7b07e505cae3127
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -705,7 +705,7 @@ bool QgsPostgresProvider::loadFields()
QString tableoidsFilter = "(" + tableoidsList.join( "," ) + ")";

// Collect formatted field types
sql = "SELECT attrelid, attnum, pg_catalog.format_type(atttypid,atttypmod), pg_catalog.col_description(attrelid,attnum), adsrc"
sql = "SELECT attrelid, attnum, pg_catalog.format_type(atttypid,atttypmod), pg_catalog.col_description(attrelid,attnum), pg_catalog.pg_get_expr(adbin,adrelid)"
" FROM pg_attribute"
" LEFT OUTER JOIN pg_attrdef ON attrelid=adrelid AND attnum=adnum"
" WHERE attrelid IN " + tableoidsFilter;

0 comments on commit 581d7f8

Please sign in to comment.
You can’t perform that action at this time.