Re: POLA violation with \c service=

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: David Fetter <david(at)fetter(dot)org>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: POLA violation with \c service=
Date: 2015-01-10 14:32:37
Message-ID: 20150110143237.GI12509@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-01-10 09:16:07 -0500, Andrew Dunstan wrote:
> +static const char uri_designator[] = "postgresql://";
> +static const char short_uri_designator[] = "postgres://";
>
> These declarations in common.h would cause a separate instance of these
> pieces of storage to occur in every object file where the .h file had been
> #included. In general, you should not expect to see any static declarations
> in .h files.

Save static inline functions, that is.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-01-10 14:49:52 Re: POLA violation with \c service=
Previous Message Andrew Dunstan 2015-01-10 14:16:07 Re: POLA violation with \c service=