Re: Proposal: Generic WAL logical messages - Mailing list pgsql-hackers

From Artur Zakirov
Subject Re: Proposal: Generic WAL logical messages
Date
Msg-id 56DF342F.3020400@postgrespro.ru
Whole thread Raw
In response to Re: Proposal: Generic WAL logical messages  (Petr Jelinek <petr@2ndquadrant.com>)
Responses Re: Proposal: Generic WAL logical messages  (Petr Jelinek <petr@2ndquadrant.com>)
List pgsql-hackers
I think here

> +const char *
> +logicalmsg_identify(uint8 info)
> +{
> +    if (info & ~XLR_INFO_MASK == XLOG_LOGICAL_MESSAGE)
> +        return "MESSAGE";
> +
> +    return NULL;
> +}

we should use brackets

const char *
logicalmsg_identify(uint8 info)
{if ((info & ~XLR_INFO_MASK) == XLOG_LOGICAL_MESSAGE)    return "MESSAGE";
return NULL;
}

Because of operator priorities 
http://en.cppreference.com/w/c/language/operator_precedence we may get 
errors.

On 01.03.2016 00:10, Petr Jelinek wrote:
> Hi,
>
> attached is the newest version of the patch.
>
> I removed the registry, renamed the 'send' to 'emit', documented the
> callback parameters properly. I also added the test to ddl.sql for the
> serialization and deserialization (and of course found a bug there) and
> in general fixed all the stuff Andres reported.
>
> (see more inline)

-- 
Artur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: multivariate statistics v11
Next
From: Fabien COELHO
Date:
Subject: Re: extend pgbench expressions with functions