summaryrefslogtreecommitdiff
path: root/src/backend/utils
AgeCommit message (Collapse)Author
2001-01-19Suppress compiler warning in MULTIBYTE code.Tom Lane
2001-01-18Fix up "Postgres-style" time interval representation when fields haveThomas G. Lockhart
mixed-signs. Previous effort left way too many minus signs, and was at least as broken as the one before that :( Clean up "ISO-style" time interval representation to omit zero fields if there is at least one non-zero field. Supress some leading plus signs when not necessary for clarity. Replace every #ifdef __CYGWIN__ block with a cleaner TIMEZONE_GLOBAL macro defined in datetime.h.
2001-01-17Change comparisons of tm->tm_isdst from "nonzero" to "greater than zero".Thomas G. Lockhart
Not sure why some were this way, and others were already correct, but it seems to have been like this for several years. This caused problems on a few damaged platforms like AIX and IRIX which do not support DST calculations for years before 1970. Thanks to Andreas Zeugswetter <ZeugswetterA@wien.spardat.at> for finding the problem.
2001-01-14Minor coding cleanups.Tom Lane
2001-01-14Another go-round on making GetRawDatabaseInfo behave as well as it can,Tom Lane
given the fundamental restriction of not looking at transaction commit data in pg_log. Use code that is actually based on tqual.c rather than ad-hoc tests. Also write the tuple fetch loop using standard access macros rather than ad-hoc code.
2001-01-14Make aclcontains() do something that's at least vaguely reasonable:Tom Lane
it now returns true if the aclitem argument exactly matches any one of the elements of the aclitem[] argument. Per complaint from Wolff 1/10/01.
2001-01-14Restructure backend SIGINT/SIGTERM handling so that 'die' interruptsTom Lane
are treated more like 'cancel' interrupts: the signal handler sets a flag that is examined at well-defined spots, rather than trying to cope with an interrupt that might happen anywhere. See pghackers discussion of 1/12/01.
2001-01-12Add more critical-section calls: all code sections that hold spinlocksTom Lane
are now critical sections, so as to ensure die() won't interrupt us while we are munging shared-memory data structures. Avoid insecure intermediate states in some code that proc_exit will call, like palloc/pfree. Rename START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be what people tend to call them anyway, and make them be called with () like a function call, in hopes of not confusing pg_indent. I doubt that this is sufficient to make SIGTERM safe anywhere; there's just too much code that could get invoked during proc_exit().
2001-01-11Remove useless DLLIMPORT (only needed in header files).Peter Eisentraut
2001-01-09Add configure check for sys_nerr, to end all discussions.Peter Eisentraut
2001-01-091. Checkpoint.undo may be after checkpoint itself:Vadim B. Mikheev
- no more elog(STOP) in StartupXLOG(); - both checkpoint' undo & redo are used to define oldest on-line log file. 2. Ability to pre-allocate a few log files at checkpoint time (wal_files option). Off by default.
2001-01-08Add some debugging support code (ifdef'd out in normal use).Tom Lane
2001-01-07Fix recent breakage of query-cancel logic, see my pghackers messageTom Lane
of 6 Jan 2001 21:55.
2001-01-06Log memory context stats to stderr when reporting a 'Memory exhausted'Tom Lane
error, so as to provide a starting point for debugging.
2001-01-06Fix memory leak in relcache handling of rules: allocate rule parsetreesTom Lane
in per-entry sub-memory-context, where they were supposed to go, rather than in CacheMemoryContext where the code was putting them. Must've suffered a severe brain fade when I wrote this :-(
2001-01-06init_irels() is changed to be called in RelationCacheInitializePhase2()Hiroshi Inoue
so that transactional control could guarantee the consistency.
2001-01-05Rename and document some invalidation routines to make it clearer thatTom Lane
they don't themselves flush any cache entries, only add to to-do lists that will be processed later.
2001-01-04I neglected to remove a debug message,sorry.Hiroshi Inoue
2001-01-03Fix breakage of rules using NOTIFY actions, per bug report and patchTom Lane
from sergiop@sinectis.com.ar.
2001-01-03Repair always-broken date_part('quarter',timestamp).Thomas G. Lockhart
Previous result did not have correct month boundaries so anything near edge cases was suspect (e.g. April was in Q1 and July, August were lumped into Q2). Thanks to Denis Osadchy <osadchy@turbo.nsk.su> for the report.
2001-01-02Clean up non-reentrant interface for hash_seq/HashTableWalk, so thatTom Lane
starting a new hashtable search no longer clobbers any other search active anywhere in the system. Fix RelationCacheInvalidate() so that it will not crash or go into an infinite loop if invoked recursively, as for example by a second SI Reset message arriving while we are still processing a prior one.
2000-12-28New WAL version - CRC and data blocks backup.Vadim B. Mikheev
2000-12-28Let's try this again on accepting the correct range of Oid input valuesTom Lane
for 64-bit platforms ...
2000-12-27Fix portability problems recently exposed by regression tests on Alphas.Tom Lane
1. Distinguish cases where a Datum representing a tuple datatype is an OID from cases where it is a pointer to TupleTableSlot, and make sure we use the right typlen in each case. 2. Make fetchatt() and related code support 8-byte by-value datatypes on machines where Datum is 8 bytes. Centralize knowledge of the available by-value datatype sizes in two macros in tupmacs.h, so that this will be easier if we ever have to do it again.
2000-12-23Replace overly-cute coding with code that (a) has defined behaviorTom Lane
according to the ANSI C spec, (b) gets the boundary conditions right, and (c) is about a third as long and three times more intelligible.
2000-12-22Small cleanup of temp-table handling. Disallow creation of a non-tempTom Lane
table that inherits from a temp table. Make sure the right things happen if one creates a temp table, creates another temp that inherits from it, then renames the first one. (Previously, system would end up trying to delete the temp tables in the wrong order.)
2000-12-22Repair not-too-well-thought-out code to do rangechecking of OIDs onTom Lane
64-bit machines. Also, make oidvectorin use the same code as oidin.
2000-12-22Add 'ONLY' to queries generated by RI triggers, so as to preserve pre-7.1Tom Lane
semantics of RI operations. Eventually we ought to look at making RI work properly across inheritance trees, but not for 7.1 ...
2000-12-22Change default output formatting for CIDR to be unabbreviated, perTom Lane
recommendation from Paul Vixie. Add a new abbrev() function to produce abbreviated format as text. No forced initdb, but new function is not available unless you do an initdb or add the pg_proc row manually.
2000-12-18Clean up backend-exit-time cleanup behavior. Use on_shmem_exit callbacksTom Lane
to ensure that we have released buffer refcounts and so forth, rather than putting ad-hoc operations before (some of the calls to) proc_exit. Add commentary to discourage future hackers from repeating that mistake.
2000-12-15here is a patch fixing today's bug report:Bruce Momjian
> Date: Thu, 14 Dec 2000 12:44:47 +0100 (CET) > From: Kovacs Zoltan Sandor <tip@pc10.radnoti-szeged.sulinet.hu> > To: pgsql-bugs@postgresql.org > Subject: [BUGS] to_char() causes backend to close connection > > Hi, this query gives different strange results: > > select to_char(now()::abstime,'YYMMDDHH24MI'); > > I get e.g. a "backend closed the channel unexpectedly..." error with > successful or failed resetting attempt (indeterministic) Again thanks Kovacs, you found really designing bug, that appear if anyone write bad format template to "number" version of to_char() (as you with 'DD'). Karel
2000-12-14BugfixJan Wieck
Trying to connect to template0 left a global referenced buffer because the scan of pg_database wasn't ended properly before elog(FATAL). Jan
2000-12-11Fix ILIKE bug (only in multi-byte case)Tatsuo Ishii
2000-12-09Portability fix from Ryan Kirkpatrick's Alpha patches. I believe thisTom Lane
is the only diff not accounted for by fmgr rewrite...
2000-12-09Suppress compiler warnings.Tom Lane
2000-12-09Fix a bug in conversion from big5 to EUC_TW (CNS 11643-1992 Plane 3)Tatsuo Ishii
Thanks Chih-Chang Hsieh <cch@cc.kmu.edu.tw> for finding the bug.
2000-12-08Repair erroneous use of hashvarlena() for MACADDR, which is not aTom Lane
varlena type. (I did not force initdb, but you won't see the fix unless you do one.) Also, make sure all index support operators and functions are careful not to leak memory for toasted inputs; I had missed some hash and rtree support ops on this point before.
2000-12-08REINDEX under WAL.Hiroshi Inoue
2000-12-07Change lpad() and rpad() to behave more Oracle-compatibly when targetTom Lane
length is less than original string length.
2000-12-07Make OVERLAPS operators conform to SQL92 spec regarding NULL handling.Tom Lane
As I read it, the spec requires a non-null result in some cases where one of the inputs is NULL: specifically, if the other endpoint of that interval is between the endpoints of the other interval, then the result is known TRUE despite the missing endpoint. The spec could've been a lot simpler if they did not intend this behavior. I did not force an initdb for this change, but if you don't do one you'll still see the old strict-function behavior.
2000-12-07Silence compiler warning.Tom Lane
2000-12-06Don't include miscadmin.h in elog.h, since the former is not part ofTom Lane
the installed header file set.
2000-12-05I've just seen what happens when the MEMORY_CONTEXT_CHECKING code firesTom Lane
an error at end of transaction ... and I did *not* like it. Reduce ERROR to NOTICE so that this situation doesn't cause an infinite loop.
2000-12-03correctionsPeter Eisentraut
2000-12-03Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane
values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
2000-12-03Repair usage of the OVERLAPS operator.Thomas G. Lockhart
Allow some operator-like tokens to be used as function names. Flesh out support for time, timetz, and interval operators and interactions. Regression tests pass, but non-reference-platform horology test results will need to be updated.
2000-12-03Final(?) GUC clean-up. Update psql tab completion.Peter Eisentraut
2000-12-03Disable elog(ERROR|FATAL) in signal handlers inVadim B. Mikheev
critical sections of code.
2000-12-01Make elog() switch to ErrorContext while invoking libpq output routines,Tom Lane
since those routines may do palloc's. We want to be fairly sure we can send the error message to the client even under low-memory conditions. That's what we stashed away 8K in ErrorContext for, after all ...
2000-12-01Pursuant to a pghackers discussion back around 11-Jul-00, get rid of aset.c'sTom Lane
not-very-good handling of mid-size allocation requests. Do everything via either the "small" case (chunk size rounded up to power of 2) or the "large" case (pass it straight off to malloc()). Increase the number of freelists a little to set the breakpoint between these behaviors at 8K.