Add feature to set optional schema parameter on configuration file via
'schema' setting.
Fix query to get columns from table while considering schema. If in
the database there exists two tables with same name in distinct schemas
it will return an error when inserting record.
ASTERISK-24967 #close
Change-Id: I691fd2cbc277fcba10e615f5884f8de5d8152f2c
"LEFT OUTER JOIN pg_attrdef d ON a.atthasdef AND d.adrelid = a.attrelid "
"AND d.adnum = a.attnum WHERE c.oid = a.attrelid AND a.atttypid = t.oid "
"AND (a.attnum > 0) AND c.relname = '%s' ORDER BY c.relname, attnum",tablename);
}
/* Query the columns */
snprintf(sqlcmd,sizeof(sqlcmd),"select a.attname, t.typname, a.attlen, a.attnotnull, d.adsrc from pg_class c, pg_type t, pg_attribute a left outer join pg_attrdef d on a.atthasdef and d.adrelid = a.attrelid and d.adnum = a.attnum where c.oid = a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname = '%s' order by c.relname, attnum",tableptr);