[GENERAL] any psql \copy tricks for default-value columns without source data?

2014-05-06 Thread David G Johnston
So, I am trying to import a file into a table and want to assign a sequence value to each record as it is imported. I know that I can pre-process the input file and simply add the needed data but I am curious if maybe there is some trick to having defaults populate for missing columns WITHOUT

Re: [GENERAL] any psql \copy tricks for default-value columns without source data?

2014-05-06 Thread Ryan Kelly
On Tue, May 05/06/14, 2014 at 01:22:20PM -0700, David G Johnston wrote: So, I am trying to import a file into a table and want to assign a sequence value to each record as it is imported. I know that I can pre-process the input file and simply add the needed data but I am curious if maybe

Re: [GENERAL] any psql \copy tricks for default-value columns without source data?

2014-05-06 Thread John R Pierce
On 5/6/2014 1:22 PM, David G Johnston wrote: I know that I can pre-process the input file and simply add the needed data but I am curious if maybe there is some trick to having defaults populate for missing columns WITHOUT explicitly specifying each and every column that is present? if you