Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
От | Pavel Stehule |
---|---|
Тема | Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based |
Дата | |
Msg-id | CAFj8pRAyzHO3PAtKAgnFmLsNRpLiVUjP-Y=bTjUqBcD9DCcYGA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: pgsql: Refactor pg_get_line() to expose an alternative StringInfo-based
|
Список | pgsql-committers |
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
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"
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
В списке pgsql-committers по дате отправления: