From: Tom Lane <tgl@sss.pgh.pa.us>
To: Niko Ware <nikowareinc@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Example 31-2. libpq Example Program 2
Date: Thu, 11 Mar 2021 11:04:17 -0500
Message-ID: <2293594.1615478657@sss.pgh.pa.us> (raw)
In-Reply-To: <CACHGMtQmkvu3LX-BJmi9kEOuzbqBhRxuZiHXQQhHU8jVd5Xg=A@mail.gmail.com>
References: <CACHGMtQmkvu3LX-BJmi9kEOuzbqBhRxuZiHXQQhHU8jVd5Xg=A@mail.gmail.com>
Niko Ware <nikowareinc@gmail.com> writes:
> I modified the code to include the "extra" member in the following
> statement:
> fprintf(stderr,
> "ASYNC NOTIFY of '%s' received from backend PID %d: %s\n",
> notify->relname, notify->be_pid, *notify->extra*);
> Both the example and my application core on an invalid address for "extra".
Modifying testlibpq2.c like that works for me, FWIW.
I speculate maybe you have a macro definition of "extra" that is bollixing
things somehow? Kind of a weak theory, but nothing else comes to mind.
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, nikowareinc@gmail.com
Subject: Re: Example 31-2. libpq Example Program 2
In-Reply-To: <2293594.1615478657@sss.pgh.pa.us>
References: <CACHGMtQmkvu3LX-BJmi9kEOuzbqBhRxuZiHXQQhHU8jVd5Xg=A@mail.gmail.com> <2293594.1615478657@sss.pgh.pa.us>
* 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