Re: ArchiveEntry optional arguments refactoring

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ArchiveEntry optional arguments refactoring
Date: 2019-01-24 12:12:40
Message-ID: CA+q6zcUbpK_a1WvUf+wMt0DUXDar29CwXD2MY9DxbHbX_p3hDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Here is another version, where I accumulated all the suggestions:

* Use NULL as a default value where it was an empty string before (this
required few minor changes for some part of the code outside ArchiveEntry)

* Rename defn, descr to createStmt, description

* Use a macro to avoid pgindent errors

About the last one. I'm also inclined to use the simpler version of
ARCHIVE_OPTS macro, mostly because the difference between "optional" and
"positional" arguments in the alternative proposal is not that visible. So

> mixing struct arguments and normal function arguments seems
> quite confusing

could probably affect not only readability, but also would be bit more
problematic for updating this code (which was the goal in the first place).

Attachment Content-Type Size
0001-ArchiveOpts-structure_v2.patch application/octet-stream 53.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-01-24 12:43:20 Re: problems with foreign keys on partitioned tables
Previous Message Alvaro Herrera 2019-01-24 12:00:13 Re: using expression syntax for partition bounds