On 11/17/15 8:53 AM, Geoff Winkless wrote:
> It takes the column's default value, since it's not explicit in the
> first INSERT.
Not sure if it would help or not, but you can use pg_get_expr(adbin,
adrelid) against pg_attrdef to get the default for a column. That would
let you dynamically insert the expression that generates the default
value into the VALUES clause.
start psql with the -E option and do \d on a table with e default to see
this in action.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com