| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: improved DefElem list processing |
| Date: | 2016-08-04 18:08:57 |
| Message-ID: | 8325.1470334137@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> Here are two WIP patches to improve the DefElem list processing that is
> used by many utility commands.
> One factors out the duplicate checks, which are currently taking up a
> lot of space with duplicate code. I haven't applied this everywhere
> yet, but the patch shows how much boring code can be saved.
+1 on the general idea, but I wonder if it's a problem that you replaced
an O(N) check with an O(N^2) check. I don't think there are any commands
that would be likely to have so many options that this would become a
serious issue, but ...
> The other adds a location field to the DefElem node.
+1 for sure, lots of places where that would be a good thing
(the duplicate check itself, for starters).
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2016-08-04 18:09:20 | Re: Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND |
| Previous Message | Bruce Momjian | 2016-08-04 18:07:46 | Re: Heap WARM Tuples - Design Draft |