From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Jon Jensen <jon(at)endpoint(dot)com> |
Subject: | Re: [PATCHES] sslmode patch |
Date: | 2003-07-26 15:22:45 |
Message-ID: | 200307261522.h6QFMju24367@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Excellent idea. Patch attached and applied.
---------------------------------------------------------------------------
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I had a little problem apply this patch because it had an #ifdef for
> > elog() parameter passing. Because ereport() is now a macro, you can't
> > do #ifdef inside a macro _call_, so I did it this way:
>
> I don't think a non-SSL-enabled build need be pointing that out in every
> error message --- the SSL phrase shouldn't even be there in the message.
> Accordingly, I'd be inclined to do this:
>
> #ifdef USE_SSL
> ereport(FATAL,
> (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
> errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", %s",
> hostinfo, port->user_name, port->database_name,
> (port->ssl ? gettext("SSL on") : gettext("SSL off")))));
> #else
> ereport(FATAL,
> (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
> errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"",
> hostinfo, port->user_name, port->database_name)));
> #endif
>
> This approach is also more localizable.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Creager | 2003-07-26 15:26:53 | Re: parallel regression test failure |
Previous Message | Tom Lane | 2003-07-26 15:22:21 | Re: parallel regression test failure |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-07-26 20:43:11 | Re: fix linux startup script |
Previous Message | Bruce Momjian | 2003-07-26 15:17:40 | Re: timestamp date_trunc('quarter',...) |