| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
displayed in the postmaster log. This avoids Windows-specific problems with
localized time zone names that are in the wrong encoding, and generally seems
like a good idea to forestall other potential platform-dependent issues.
To preserve the existing behavior that all backends will log in the same time
zone, create a new GUC variable log_timezone that can only be changed on a
system-wide basis, and reference log-related calculations to that zone instead
of the TimeZone variable.
This fixes the issue reported by Hiroshi Saito that timestamps printed by
xlog.c startup could be improperly localized on Windows. We still need a
simpler patch for that problem in the back branches, however.
|
|
|
|
|
|
|
|
|
|
|
| |
overruns (neither of which seem likely to be exploitable as security holes,
fortunately, since the provoker can't control the data written). One of
these is due to choosing to stomp on the output of a called function, which
is bad news in any case; make it treat the called functions' results as
read-only. Avoid some unnecessary palloc/pfree traffic too; it's not
really helpful to free small temporary objects, and again this is presuming
more than it ought to about the nature of the results of called functions.
Per report from Patrick Welche and additional code-reading by Imad.
|
|
|
|
|
|
|
|
|
|
|
| |
Get rid of VARATT_SIZE and VARATT_DATA, which were simply redundant with
VARSIZE and VARDATA, and as a consequence almost no code was using the
longer names. Rename the length fields of struct varlena and various
derived structures to catch anyplace that was accessing them directly;
and clean up various places so caught. In itself this patch doesn't
change any behavior at all, but it is necessary infrastructure if we hope
to play any games with the representation of varlena headers.
Greg Stark and Tom Lane
|
|
|
|
|
| |
we can't overflow to the next higher units, and we might print the lower
units for MS.
|
|
|
|
| |
Brendan Jurd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to_timestamp():
- ID for day-of-week
- IDDD for day-of-year
This makes it possible to convert ISO week dates to and from text
fully represented in either week ('IYYY-IW-ID') or day-of-year
('IYYY-IDDD') format.
I have also added an 'isoyear' field for use with extract / date_part.
Brendan Jurd
|
|
|
|
|
|
| |
Converting from char using 'D' doesn't make lots of sense, of course.
Report from Brendan Jurd.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
trnasformed to lower or upper string.
Pavel Stehule
|
|
|
|
|
| |
Assume "TM" when input fields are variable-length, like month or day
names. This matches Oracle behavior.
|
|
|
|
|
|
|
|
| |
standard convention the 21st century runs from 2001-2100, not 2000-2099,
so make it work like that. Per bug #2885 from Akio Iwaasa.
Backpatch to 8.2, but no further, since this is really a definitional
change; users of older branches are probably more interested in stability.
|
|
|
|
| |
back-stamped for this.
|
|
|
|
| |
of Dennis Björklund.
|
|
|
|
|
|
| |
Fix to_char() locale handling to honor LC_TIME, not LC_MESSAGES.
Euler Taveira de Oliveira
|
|
|
|
| |
Euler Taveira de Oliveira
|
| |
|
|
|
|
|
|
|
| |
Allow to_char() "D" format specifiers for interval/time.
It doesn't work, and I doubt it is useful enough to fix ("D" = day of
week).
|
|
|
|
| |
Report from Josh Tolley.
|
|
|
|
| |
our to_* functions were not handling that.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
French uses "" for "don't want". Seems we have to keep the existing
behavior.
|
|
|
|
| |
report from French Debian user. psql already handles "" fine.
|
|
|
|
| |
Euler Taveira de Oliveira
|
|
|
|
|
|
|
|
|
|
|
| |
Map them to a single day, so '30 hours' is 'AM'.
Have to_char(interval) and to_char(time) use "HH", "HH12" as 12-hour
intervals, rather than bypass and print the full interval hours. This
is neeeded because to_char(time) is mapped to interval in this function.
Intervals should use "HH24", and document suggestion.
Allow "D" format specifiers for interval/time.
|
|
|
|
|
|
|
|
|
| |
comment line where output as too long, and update typedefs for /lib
directory. Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).
Backpatch to 8.1.X.
|
|
|
|
| |
Per gripe from Chris Matheson.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Fix to_char(interval) to return large year/month/day/hour values that
are larger than possible timestamp values.
Prevent to_char(interval) format specifications that make no sense, like
Month.
Clean up formatting.c code to more logically handle return lengths.
|
| |
|
| |
|
|
|
|
| |
integer with flags.
|
|
|
|
|
| |
parentheses. This avoids possible operator precedence problems, and
is consistent with most of the macro definitions in the tree.
|
|
|
|
|
|
|
|
|
|
|
| |
near daylight savings time boudaries. This handles it properly, e.g.
test=> select '2005-04-03 04:00:00'::timestamp at time zone
'America/Los_Angeles';
timezone
------------------------
2005-04-03 07:00:00-04
(1 row)
|
|
|
|
|
|
|
| |
#define DAYS_PER_YEAR 365.25
#define MONTHS_PER_YEAR 12
#define DAYS_PER_MONTH 30
#define HOURS_PER_DAY 24
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
24 hours. This is very helpful for daylight savings time:
select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours';
?column?
----------------------
2005-05-04 01:00:00-04
select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day';
?column?
----------------------
2005-05-04 01:00:00-04
Michael Glaesemann
|
| |
|
|
|
|
|
|
|
|
| |
is redundant after a check has already been made for "num < 0". The "set"
variable can also be removed, as it is now no longer used. Per checking
with Karel, this is the right fix.
Per Coverity static analysis performed by EnterpriseDB.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"AT TIME ZONE", and not just the shorlist previously available. For
example:
SELECT CURRENT_TIMESTAMP AT TIME ZONE 'Europe/London';
works fine now. It will also obey whatever DST rules were in effect at
just that date, which the previous implementation did not.
It also supports the AT TIME ZONE on the timetz datatype. The whole
handling of DST is a bit bogus there, so I chose to make it use whatever
DST rules are in effect at the time of executig the query. not sure if
anybody is actuallyi *using* timetz though, it seems pretty
unpredictable just because of this...
Magnus Hagander
|
|
|
|
| |
them, the executation behavior could be unexpected.
|
|
|
|
|
|
| |
when a zero-month interval is given. Per discussion with Karel.
Also, some desultory const-labeling of constant tables. More could be
done along that line.
|
|
|
|
| |
Karel Zak
|
|
|
|
|
| |
of an sprintf() as a source string. Demonstrably does not work with
recent gcc and/or glibc on some platforms.
|
| |
|
| |
|