From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Emmanuel Cecchet <manu(at)frogthinker(dot)org> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Emmanuel Cecchet <manu(at)asterdata(dot)com>, Emmanuel Cecchet <Emmanuel(dot)Cecchet(at)asterdata(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: generic copy options |
Date: | 2009-09-21 15:59:45 |
Message-ID: | 18264.1253548785@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Emmanuel Cecchet <manu(at)frogthinker(dot)org> writes:
> The easiest for both implementation and documentation might just be to
> have a matrix of options.
> Each option has a row and a column in the matrix. The intersection of a
> row and a column is set to 0 if options are not compatible and set to 1
> if it is. This way we are sure to capture all possible combinations.
> This way, each time we find a new option, we just have to check in the
> matrix if it is compatible with the already existing options. Note that
> we can also replace the 0 with an index in an error message array.
This seems like overkill at the moment. Maybe when/if we get to
actually supporting three or more COPY formats, we'd need it. Right
now all we are trying to do is make the grammar not be a factor in
adding options, and the foreseen new options aren't about new formats
at all. So I'm inclined to just fix the grammar and not do
any refactoring of the code in copy.c.
As far as I can tell, the majority opinion is to use "format csv" and
not have the "csv_" prefixes on the options, so I will adjust the patch
accordingly and commit it (barring any other problems coming up when
I read it more closely).
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-09-21 16:23:44 | Re: TODO item: Allow more complex user/database default GUC settings |
Previous Message | Robert Haas | 2009-09-21 15:08:05 | Re: TODO item: Allow more complex user/database default GUC settings |