improved DefElem list processing

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: improved DefElem list processing
Date: 2016-08-04 15:57:06
Message-ID: 4021548b-0c51-6298-d54e-4cc931d73182@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

The other adds a location field to the DefElem node. This allows
showing an error pointer if there is a problem in one of the options,
which can be useful for complex commands such as COPY or CREATE USER.

At the moment, these patches are independent and don't work together,
but the second one would become much easier if the first one is accepted.

If these ideas are acceptable, I'll produce a complete patch series.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Add-location-field-to-DefElem.patch text/x-patch 40.6 KB
0001-Factor-out-duplicate-check-in-List-of-DefElems.patch text/x-patch 15.7 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2016-08-04 16:29:10 Re: Design for In-Core Logical Replication
Previous Message Alvaro Herrera 2016-08-04 15:21:25 Re: regression test for extended query protocol