Re: improved DefElem list processing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: improved DefElem list processing
Date
Msg-id 8325.1470334137@sss.pgh.pa.us
Whole thread Raw
In response to improved DefElem list processing  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: improved DefElem list processing  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: improved DefElem list processing  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Heap WARM Tuples - Design Draft
Next
From: Robert Haas
Date:
Subject: Re: Double invocation of InitPostmasterChild in bgworker with -DEXEC_BACKEND