From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based |
Date: | 2020-09-07 16:34:02 |
Message-ID: | CAFj8pRAyzHO3PAtKAgnFmLsNRpLiVUjP-Y=bTjUqBcD9DCcYGA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
po 7. 9. 2020 v 16:48 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)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
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-09-07 16:54:00 | Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based |
Previous Message | Tom Lane | 2020-09-07 16:03:09 | pgsql: Frob numeric.c loop so that clang will auto-vectorize it too. |