summaryrefslogtreecommitdiff
path: root/src/backend/utils
AgeCommit message (Collapse)Author
2002-11-02Remove encoding lookups from grammar stage, push them back to placesTom Lane
where it's safe to do database access. Along the way, fix core dump for 'DEFAULT' parameters to CREATE DATABASE. initdb forced due to change in pg_proc entry.
2002-11-02Clean up a few fprintf(stderr)'s that should be elog's.Tom Lane
2002-11-01Arrange to compile flex output files as inclusions into other filesTom Lane
(usually bison output files), not as standalone files. This hack works around flex's insistence on including <stdio.h> before we are able to include postgres.h; postgres.h will already be read before the compiler starts to read the flex output file. Needed for largefile support on some platforms.
2002-11-01After elog(PANIC), exit with abort() not proc_exit(). This allows aTom Lane
core file to be produced for debugging, and avoids trying to run the normal proc-exit cleanup hooks, which are likely to cause additional problems if the system is hosed.
2002-10-31Got tired of explaining why this Assert is not wrong.Tom Lane
2002-10-31Code review for statement_timeout patch. Fix some race conditionsTom Lane
between signal handler and enable/disable code, avoid accumulation of timing error due to trying to maintain remaining-time instead of absolute-end-time, disable timeout before commit not after.
2002-10-31Avoid use of inline functions that are not declared static. Needed toTom Lane
conform to C99's brain-dead notion of how inline functions should work.
2002-10-26Add missing semicolons to a few PG_FUNCTION_INFO_V1 calls.Tom Lane
2002-10-19Fix range-query estimation to not double-exclude NULLs, per gripe fromTom Lane
Ray Ontko 28-June-02. Also, fix prefix_selectivity for NAME lefthand variables (it was bogusly assuming binary compatibility), and adjust make_greater_string() to not call pg_mbcliplen() with invalid multibyte data (this last per bug report that I can't find at the moment, but it was in July '02).
2002-10-19This patch adds some missing functions for float8 math operations,Bruce Momjian
specifically ceil(), floor(), and sign(). There may be other functions that need to be added, but this is a start. I've included some simple regression tests. Neil Conway
2002-10-18Fix breakage that had crept into setlocale() usage: once again we'veTom Lane
been bit by the fact that the locale functions return pointers to modifiable variables. I added some comments that might help us avoid the mistake in future.
2002-10-14Arrange to copy relcache's trigdesc structure at the start of anyTom Lane
query that uses it. This ensures that triggers will be applied consistently throughout a query even if someone commits changes to the relation's pg_class.reltriggers field meanwhile. Per crash report from Laurette Cisneros. While at it, simplify memory management in relcache.c, which no longer needs the old hack to try to keep trigger info in the same place over a relcache entry rebuild. (Should try to fix rd_att and rewrite-rule access similarly, someday.) And make RelationBuildTriggers simpler and more robust by making it build the trigdesc in working memory and then CopyTriggerDesc() into cache memory.
2002-10-13Make macaddr_in reject trailing garbage (except whitespace).Tom Lane
Per gripe from Patrick Welche, 13-Oct-2002.
2002-10-11Oops, back out newNode changes. We are not ready for that yet.Bruce Momjian
2002-10-11Prevent tv_sec from becoming negative in connection timeout code.Bruce Momjian
2002-10-08Move responsibility for setting QuerySnapshot for utility statementsTom Lane
into postgres.c; make sure it happens for all cases that seem to need it. Perhaps it would be better to explicitly exclude just a few utility statement types from setting a snapshot?
2002-10-04Fix a couple of grammatical errors in error messages.Tom Lane
2002-10-04Tweak a few of the most heavily used function call points to zero outTom Lane
just the significant fields of FunctionCallInfoData, rather than MemSet'ing the whole struct to zero. Unused positions in the arg[] array will thereby contain garbage rather than zeroes. This buys back some of the performance hit from increasing FUNC_MAX_ARGS. Also tweak tuplesort.c code for more speed by marking some routines 'inline'. All together these changes speed up simple sorts, like count(distinct int4column), by about 25% on a P4 running RH Linux 7.2.
2002-10-03Hack to make it possible to load CREATE CONSTRAINT TRIGGER commands thatTom Lane
are missing the FROM clause (due to a long-ago pg_dump bug). Patch by Stephan Szabo, minor tweaking by Tom Lane.
2002-10-03In a bootstrap process or standalone backend, set MaxBackends = 1Tom Lane
to avoid unnecessary consumption of semaphores.
2002-10-03This patch removes two unused global variables from globals.cBruce Momjian
Neil Conway
2002-10-02Alter scale selection for NUMERIC division and transcendental functionsTom Lane
so that precision of result is always at least as good as you'd get from float8 arithmetic (ie, always at least 16 digits of accuracy). Per pg_hackers discussion a few days ago.
2002-10-02Turn GUC log_min_error_statement off by default by setting it to PANIC.Bruce Momjian
2002-09-24Change default privileges for languages and functions to be PUBLIC USAGETom Lane
and PUBLIC EXECUTE, respectively. Per discussion about easing updates from prior versions.
2002-09-24Tweak conversion names to follow the established naming scheme, andPeter Eisentraut
document that scheme.
2002-09-22RelationClearRelation must reset rd_targblock and update rd_nblocksTom Lane
even when dealing with a nailed-in-cache relation; otherwise, following VACUUM truncation of a system catalog, other backends might have unreasonably large values of these fields.
2002-09-22server_min_messages and friends should have valid values at bootup.Tom Lane
2002-09-22Bring SIMILAR TO and SUBSTRING into some semblance of conformance withTom Lane
the SQL99 standard. (I'm not sure that the character-class features are quite right, but that can be fixed later.) Document SQL99 and POSIX regexps as being different features; provide variants of SUBSTRING for each.
2002-09-21Add last-ditch defense against attempts to compile datetime code withTom Lane
-ffast-math.
2002-09-20The patch fix bug described in TODO:Bruce Momjian
* to_char(0,'FM999.99') returns a period, to_char(1,'FM999.99') does not Karel Zak
2002-09-20Tom Lane wrote:Bruce Momjian
> I see in your recent bytea-LIKE patch > > if (datatype != BYTEAOID && pg_database_encoding_max_length() > 1) > len = pg_mbcliplen((const unsigned char *) workstr, len, len - 1); > else > len -= -1; > > Surely there's one too many minus signs in that last? Joe Conway
2002-09-20This patch cleans up some of the code in src/util/adt/formatting.c,Bruce Momjian
fixes a few minor bugs (typos, potential buffer overruns, etc.), and fixes some spelling/grammar mistakes. Neil Conway
2002-09-19Tweak heap.c to refuse attempts to create table columns of standaloneTom Lane
composite types. Add a couple more lsyscache.c routines to support this, and make use of them in some other places that were doing lookups the hard way.
2002-09-19Department of second thoughts: suppressing implicit casts everywhere inTom Lane
ruleutils display is not such a great idea. For arguments of functions and operators I think we'd better keep the historical behavior of showing such casts explicitly, to ensure that the function/operator is reparsed the same way when the rule is reloaded. This also makes the output of EXPLAIN less obscurantist about exactly what's happening.
2002-09-18Extend pg_cast castimplicit column to a three-way value; this allows usTom Lane
to be flexible about assignment casts without introducing ambiguity in operator/function resolution. Introduce a well-defined promotion hierarchy for numeric datatypes (int2->int4->int8->numeric->float4->float8). Change make_const to initially label numeric literals as int4, int8, or numeric (never float8 anymore). Explicitly mark Func and RelabelType nodes to indicate whether they came from a function call, explicit cast, or implicit cast; use this to do reverse-listing more accurately and without so many heuristics. Explicit casts to char, varchar, bit, varbit will truncate or pad without raising an error (the pre-7.2 behavior), while assigning to a column without any explicit cast will still raise an error for wrong-length data like 7.3. This more nearly follows the SQL spec than 7.2 behavior (we should be reporting a 'completion condition' in the explicit-cast cases, but we have no mechanism for that, so just do silent truncation). Fix some problems with enforcement of typmod for array elements; it didn't work at all in 'UPDATE ... SET array[n] = foo', for example. Provide a generalized array_length_coerce() function to replace the specialized per-array-type functions that used to be needed (and were missing for NUMERIC as well as all the datetime types). Add missing conversions int8<->float4, text<->numeric, oid<->int8. initdb forced.
2002-09-18Fix bug in encoding conversion map.Tatsuo Ishii
2002-09-18Update Japanese README so that it reflects the changes made to theTatsuo Ishii
conversion function interface.
2002-09-13Change Assert(len > 0) to Assert(len >= 0)Tatsuo Ishii
Change PG_RETURN_INT32(0) to PG_RETURN_VOID()
2002-09-12Avoid misleading error message when SET/RESET target variable nameTom Lane
doesn't match any known variable.
2002-09-10Powerup defaults for LC_foo GUC variables should match what main.c does.Tom Lane
2002-09-05Assorted fixes for Cygwin:Peter Eisentraut
Eliminate the mysterious games that the Cygwin build plays with the linker flag variables. DLLLIBS is gone, use SHLIB_LINK like everyone else. Detect cygipc in configure, after the linker flags are set up, otherwise configure might not work at all. Make sure everything is covered by make clean. Fix the build of the new conversion procedure modules. Add new DLLIMPORT markers where required. Finally, the compiler complains if we use an explicit -I/usr/local/include, so don't do that. Curiously, -L/usr/local/lib is still necessary.
2002-09-05Be careful to include postgres.h *before* any system headers, to ensureTom Lane
that the right flavors of largefile-related definitions are seen. Most of these changes are probably unnecessary, but better safe than sorry.
2002-09-04pgindent run.Bruce Momjian
2002-09-04Avoid multiple scans of utils/mb/conversion_procs/ subdirectories duringTom Lane
'make install'; there are enough of 'em that this slowed down the make noticeably. Ensure that 'all' is the default make target in all these directories (defaulting to 'make install' is surprising and dangerous IMHO). Fix a couple small typos.
2002-09-04Refrect the changes to src/test/regress/sql/conversion.sql By Tom.Tatsuo Ishii
2002-09-03EXTRACT(EPOCH FROM timestamp) gave wrong answers in the int64-timestampTom Lane
case for timestamptz input, and differently wrong answers in the float- timestamp case for timestamp input.
2002-09-03Arrange for the default permissions on a database to allow temp tableTom Lane
creation to world, but disallow temp table creation in template1. Per latest round of pghackers discussion. I did not force initdb, but the permissions lockdown on template1 will not take effect unless you do one (or manually REVOKE TEMP ON DATABASE template1 FROM public).
2002-09-03Remove all traces of multibyte and locale options. Clean up commentsPeter Eisentraut
referring to "multibyte" where it really means character encoding.
2002-09-03Work around mktime() brain damage in recent versions of glibc by usingTom Lane
a series of localtime() calls to determine the local timezone offset when mktime() fails. This eliminates regression failures on RHL 7.3, and should continue to work until it occurs to the glibc boys to break localtime() as well. By then I hope we'll have our own timezone code...
2002-09-03Eliminate unnecessary dependency on mktime(), and consequent 'Unable toTom Lane
convert date to tm' failures, by using DetermineLocalTimeZone() instead.