On 01/09/2015 02:15 PM, David Fetter wrote:
Some C cleanups...
Not quite enough cleanup. As I told you on IRC, the only addition to
common.h should be the declaration of recognized_connection_string.
These do not belong there (they belong in common.c):
+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.
In addition, you need to ensure that recognized_connection_string() is
not called with a NULL argument.
cheers
andrew
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers