Hi,
Having FORCE_NULL(*) and FORCE_NOT_NULL(*) sounds good, since postgres
already has FORCE_QUOTE(*).
I just quickly tried out your patch. It worked for me as expected.
One little suggestion:
+ if (cstate->opts.force_notnull_all)
> + {
> + int i;
> + for(i = 0; i < num_phys_attrs; i++)
> + cstate->opts.force_notnull_flags[i] = true;
> + }
Instead of setting force_null/force_notnull flags for all columns, what
about simply setting "attnums" list to cstate->attnumlist?
Something like the following should be enough :
> if (cstate->opts.force_null_all)
> attnums = cstate->attnumlist;
> else
> attnums = CopyGetAttnums(tupDesc, cstate->rel, cstate->opts.force_null);
Thanks,
--
Melih Mutlu
Microsoft