From: Pavel Stehule <pavel.stehule@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
Date: Mon, 7 Sep 2020 18:34:02 +0200
Message-ID: <CAFj8pRAyzHO3PAtKAgnFmLsNRpLiVUjP-Y=bTjUqBcD9DCcYGA@mail.gmail.com> (raw)
In-Reply-To: <1668181.1599490126@sss.pgh.pa.us>
References: <20200907142935.GA28809@alvherre.pgsql>
<1668181.1599490126@sss.pgh.pa.us>
po 7. 9. 2020 v 16:48 odesÃlatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > On 2020-Sep-07, Pavel Stehule wrote:
> >> I tried to reuse this new API in pg_dump.c, and I had a problem with
> >> private struct StringInfo.
>
> >> maybe there should be included directly with #include
> "lib/stringinfo.h" ?
>
> > That's the right thing to do, yes.
>
> Yeah, if you want to use pg_get_line_append, you need to include
> both those headers.
>
here is a patch
inline patch 1: src/bin/initdb/initdb.c (+1/-0 lines) download inline-1.patchdiff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.cindex 37e0d7ceab..0dcc518beb 100644--- a/src/bin/initdb/initdb.c+++ b/src/bin/initdb/initdb.c@@ -72,6 +72,7 @@
#include "fe_utils/string_utils.h"
#include "getaddrinfo.h"
#include "getopt_long.h"
+#include "lib/stringinfo.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
Regards
Pavel
> regards, tom lane
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: pavel.stehule@gmail.com, tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com
Subject: Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
In-Reply-To: <CAFj8pRAyzHO3PAtKAgnFmLsNRpLiVUjP-Y=bTjUqBcD9DCcYGA@mail.gmail.com>
References: <20200907142935.GA28809@alvherre.pgsql> <1668181.1599490126@sss.pgh.pa.us> <CAFj8pRAyzHO3PAtKAgnFmLsNRpLiVUjP-Y=bTjUqBcD9DCcYGA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox