| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
to date, as per bug #4702 and subsequent discussion. In particular, make it
work for years specified using AD/BC or CC fields, and fix the test for "no
year specified" so that it doesn't trigger inappropriately for 1 BC (which it
was doing even in code paths that had nothing to do with to_timestamp). I
also did some minor code beautification in the non-ISO-day-number code path.
This area has been busted all along, but because the code has been rewritten
repeatedly, it would be considerable trouble to back-patch. It's such a
corner case that it doesn't seem worth the effort.
|
|
|
|
|
|
|
|
|
|
| |
format codes are misapplied to a numeric argument. (The code still produces
a pretty bogus error message in such cases, but I'll settle for stopping the
crash for now.) Per bug #4700 from Sergey Burladyan.
Problem exists in all supported branches, so patch all the way back.
In HEAD, also clean up some ugly coding in the nearby cache management
code.
|
|
|
|
| |
an unlikely call mode, but better be safe.
|
|
|
|
|
|
| |
that the data type and GUC accepts.
ITAGAKI Takahiro
|
|
|
|
|
|
| |
fail to provide the function itself. Not sure how we escaped testing anything
later than 7.3 on such cases, but they still exist, as per André Volpato's
report about AIX 5.3.
|
|
|
|
|
|
|
|
|
|
|
| |
looks for a CaseTestExpr to figure out what the parser did, but it failed to
consider the possibility that an implicit coercion might be inserted above
the CaseTestExpr. This could result in an Assert failure in some cases
(but correct results if Asserts weren't enabled), or an "unexpected CASE WHEN
clause" error in other cases. Per report from Alan Li.
Back-patch to 8.1; problem doesn't exist before that because CASE was
implemented differently.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
unary minus operators. We weren't attempting to prevent minus zero anywhere
else; in view of our gradual trend to make the float datatypes more IEEE
standard compliant, we should allow minus zero here rather than disallow it
elsewhere.
We don't, however, expect that all platforms will produce minus zero, so
we need to adjust the one affected regression test to allow both results.
Per discussion of bug #4660.
(In passing, clean up a couple other minor infelicities in float.c.)
|
|
|
|
|
|
|
| |
unique for a particular query, if the index predicate is satisfied. This
requires a bit of reordering of operations so that we check the predicates
before doing any selectivity estimates, but shouldn't really cause any
noticeable slowdown. Per a comment from Michal Politowski.
|
|
|
|
|
|
|
|
|
| |
designations (AM/PM). Also separate out matching of a meridian with
periods (e.g. A.M.) and with those without.
Do the same for AD/BC.
Brendan Jurd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
has_column_privilege and has_any_column_privilege SQL functions; fix the
information_schema views that are supposed to pay attention to column
privileges; adjust pg_stats to show stats for any column you have select
privilege on; and fix COPY to allow copying a subset of columns if the user
has suitable per-column privileges for all the columns.
To improve efficiency of some of the information_schema views, extend the
has_xxx_privilege functions to allow inquiring about the OR of a set of
privileges in just one call. This is just exposing capability that already
existed in the underlying aclcheck routines.
In passing, make the information_schema views report the owner's own
privileges as being grantable, since Postgres assumes this even when the grant
option bit is not set in the ACL. This is a longstanding oversight.
Also, make the new has_xxx_privilege functions for foreign data objects follow
the same coding conventions used by the older ones.
Stephen Frost and Tom Lane
|
|
|
|
| |
Alvaro.
|
|
|
|
|
|
| |
when building on mingw.
ITAGAKI Takahiro
|
|
|
|
| |
Stephen Frost, with help from KaiGai Kohei and others
|
|
|
|
|
| |
For some reason it broke OpenBSD compile even when it's inside a
#ifdef WIN32 block.....
|
|
|
|
|
|
|
|
|
|
|
| |
Also, if linked against other versions than the default MSVCRT library
(for example the MSVC build which links against MSVCRT80), also update
the cache in the default MSVCRT at the same time.
This should fix the issues with setting LC_MESSAGES on the MSVC build.
Original patch from Hiroshi Inoue and Hiroshi Saito, much rewritten
by me.
|
|
|
|
|
| |
* Use correct buffer size MAX_L10N_DATA
* Use strlcpy instead of StrNCpy
|
|
|
|
|
|
|
| |
parts of a time string so it properly handles different encodings.
Original patch by Hiroshi Saito, heavily reworked by me and
ITAGAKI Takahiro.
|
| |
|
|
|
|
|
| |
debug_query_string; this allows current_query() to be more accurate;
docs updated; per idea from Tom
|
|
|
|
| |
'query_string' from current_query().
|
|
|
|
|
|
|
|
|
| |
not include postgres.h nor anything else it doesn't directly need. Add
#includes to calling files as needed to compensate. Per my proposal of
yesterday.
This should be noted as a source code change in the 8.4 release notes,
since it's likely to require changes in add-on modules.
|
|
|
|
|
| |
where there's no limit on the size of datum we'll try to compress.
Other 8.4 tweaks to the behavior remain in place. Per discussion.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
so that user-defined window functions are possible. For the moment you'll
have to write them in C, for lack of any interface to the WindowObject API
in the available PLs, but it's better than no support at all.
There was some debate about the best syntax for this. I ended up choosing
the "it's an attribute" position --- the other approach will inevitably be
more work, and the likely market for user-defined window functions is
probably too small to justify it.
|
|
|
|
|
|
|
|
| |
patch. This includes the ability to force the frame to cover the whole
partition, and the ability to make the frame end exactly on the current row
rather than its last ORDER BY peer. Supporting any more of the full SQL
frame-clause syntax will require nontrivial hacking on the window aggregate
code, so it'll have to wait for 8.5 or beyond.
|
|
|
|
| |
Hitoshi Harada, with some kibitzing from Heikki and Tom.
|
|
|
|
|
|
|
|
| |
This doesn't do any remote or external things yet, but it gives modules
like plproxy and dblink a standardized and future-proof system for
managing their connection information.
Martin Pihlak and Peter Eisentraut
|
|
|
|
|
|
| |
explicit cast to show the intended array type, we forgot to teach ruleutils.c
to print out such constructs properly. Found by noting bogus output from
recent changes in polymorphism regression test.
|
|
|
|
|
| |
per recent discussions. In passing this also fixes a couple of bugs in
the previous variadic-parameters patch.
|
|
|
|
|
|
|
|
|
|
|
| |
to return NULL, instead of erroring out, if the target object is specified by
OID and we can't find that OID in the catalogs. Since these functions operate
internally on SnapshotNow rules, there is a race condition when using them
in user queries: the query's MVCC snapshot might "see" a catalog row that's
already committed dead, leading to a failure when the inquiry function is
applied. Returning NULL should generally provide more convenient behavior.
This issue has been complained of before, and in particular we are now seeing
it in the regression tests due to another recent patch.
|
|
|
|
|
|
|
|
|
|
| |
pg_database_encoding_max_length() predicts the maximum character length
returned by wchar2char(). Per Hiroshi Inoue, MB_CUR_MAX isn't usable on
Windows because we allow encoding = UTF8 when the locale says differently;
and getting rid of it seems a good idea on general principles because it
narrows our dependence on libc's locale API just a little bit more.
Also install a check for overflow of the buffer size computation.
|
|
|
|
|
| |
appendix on key words. catdesc was originally intended as computer-readable,
but since we ended up adding catcode, we can have more elaborate descriptions.
|
|
|
|
| |
Pavel Stehule, with some tweaks by Peter Eisentraut
|
|
|
|
|
| |
gin_cmp_tslexeme and gin_cmp_prefix functions. Should shave off a few
cycles from GIN operations.
|
|
|
|
|
|
|
|
|
|
|
| |
is treated like a non-digit separator. This fixes the inconsistency in
examples like:
to_timestamp('2008-01-2', 'YYYY-MM-DD') -- didn't work
and
to_timestamp('2008-1-02', 'YYYY-MM-DD') -- did work
|
|
|
|
|
| |
Actually, it can't but some compilers are not smart enough.
Per Peter Eisentraut gripe.
|
|
|
|
| |
Performance is increased from 50% up to 10^3 times depending on data.
|
|
|
|
|
| |
a pointer, why don't we just fix that. Every known use of "internal" really
means a pointer anyway.
|
|
|
|
|
|
|
| |
anyelement. This lacks the WITH ORDINALITY option, as well as the multiple
input arrays option added in the most recent SQL specs. But it's still a
pretty useful subset of the spec's functionality, and it is enough to
allow obsoleting contrib/intagg.
|
|
|
|
| |
about how this is playing fast and loose with the type system.
|
|
|
|
|
|
|
| |
Rearrange the documentation a bit now that array_agg and xmlagg have similar
semantics and issues.
best of Robert Haas, Jeff Davis, Peter Eisentraut
|
|
|
|
|
|
|
|
|
|
| |
function as a special case.
This version still has the suspicious behavior of returning null for an
empty array (rather than zero), but this may need a wholesale revision of
empty array behavior, currently under discussion.
Jim Nasby, Robert Haas, Peter Eisentraut
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in "postgres_verbose" intervalstyle, and the equally arbitrary decision to
show at least two fractional-seconds digits in most other datetime display
styles. This results in some minor changes in the expected regression test
outputs.
Also, coalesce a lot of repetitive code in datetime.c into subroutines,
for clarity and ease of maintenance. In particular this roughly halves
the number of #ifdef HAVE_INT64_TIMESTAMP segments.
Ron Mayer, with some additional kibitzing from Tom Lane
|
|
|
|
|
|
|
|
| |
specifically, we can input either the "format with designators" or the
"alternative format", and we can output the former when IntervalStyle is set
to iso_8601.
Ron Mayer
|
| |
|
|
|
|
|
|
| |
the length of a UTF8 character with pg_mblen (wrong if DB encoding isn't
UTF8), and the latter was blithely assuming that a static buffer would somehow
revert to all zeroes for each use.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
from DateStyle, and create a new interval style that produces output matching
the SQL standard (at least for interval values that fall within the standard's
restrictions). IntervalStyle is also used to resolve the conflict between the
standard and traditional Postgres rules for interpreting negative interval
input.
Ron Mayer
|
|
|
|
|
| |
it behaves correctly for a leading minus sign, zero year value, and
nonzero month value. Per discussion with Ron Mayer.
|
| |
|