Commit 312d5179 authored by Tom Lane's avatar Tom Lane

Suppress leap-second-aware timezones in the output of pg_tzenumerate_next,

and thereby in the pg_timezone_names view.  Although we allow such zones
to be used in certain limited contexts like AT TIME ZONE, we don't allow
them in SET TIME ZONE, and bug #4528 shows that they're more likely to
confuse users than do anything useful.  So hide 'em.  (Note that we don't
even generate these zones when installing our own timezone database.
But they are likely to be present when using a system-provided database.)
parent 10e3acb8
......@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.60 2008/07/01 03:40:55 tgl Exp $
* $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.61 2008/11/13 20:49:38 tgl Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -1499,6 +1499,12 @@ pg_tzenumerate_next(pg_tzenum *dir)
continue;
}
if (!tz_acceptable(&dir->tz))
{
/* Ignore leap-second zones */
continue;
}
/* Timezone loaded OK. */
return &dir->tz;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment