summaryrefslogtreecommitdiff
path: root/src/backend/utils
AgeCommit message (Collapse)Author
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.
2000-12-01It seems appropriate that the extended MEMORY_CONTEXT_CHECKING codeTom Lane
immediately uncovered three of Karel's own bugs, including a routine that scribbled on its input (naughty naughty!)
2000-12-01Clean up MEMORY_CONTEXT_CHECKING code, and apply it more thoroughly. Also,Tom Lane
apply Karel Zak's patch to recycle residual space in an exhausted allocation block. (Bet you thought I'd forgot about that, Karel?)
2000-11-30Make all commands that link a program look likePeter Eisentraut
$(CC) $(CFLAGS) $(LDFLAGS) <object files> <extra-libraries> $(LIBS) -o $@ This form seemed to be the most portable, readable, and logical, but in any case it's better than having a dozen different ones in the tree.
2000-11-30Remove VARLENA_FIXED_SIZE hack, which is irreversibly broken now thatTom Lane
both MULTIBYTE and TOAST prevent char(n) from being truly fixed-size. Simplify and speed up fastgetattr() and index_getattr() macros by eliminating special cases for attnum=1. It's just as fast to handle the first attribute by presetting its attcacheoff to zero; so do that instead when loading the tupledesc in relcache.c.
2000-11-30No more #ifdef XLOG.Vadim B. Mikheev
2000-11-30XLOG stuff for sequences.Vadim B. Mikheev
CommitDelay in guc.c
2000-11-29Get rid of not-very-portable fcntl(F_SETLK) mechanism for locking the UnixTom Lane
socket file, in favor of having an ordinary lockfile beside the socket file. Clean up a few robustness problems in the lockfile code. If postmaster is going to reject a connection request based on database state, it will now tell you so before authentication exchange not after. (Of course, a failure after is still possible if conditions change meanwhile, but this makes life easier for a yet-to-be-written pg_ping utility.)
2000-11-28aclitemout() shouldn't coredump when it finds an ACL itemTom Lane
for a now-vanished group. Instead, display the numeric group ID, same as it does for vanished users.
2000-11-28Significant cleanups in SysV IPC handling (shared mem and semaphores).Tom Lane
IPC key assignment will now work correctly even when multiple postmasters are using same logical port number (which is possible given -k switch). There is only one shared-mem segment per postmaster now, not 3. Rip out broken code for non-TAS case in bufmgr and xlog, substitute a complete S_LOCK emulation using semaphores in spin.c. TAS and non-TAS logic is now exactly the same. When deadlock is detected, "Deadlock detected" is now the elog(ERROR) message, rather than a NOTICE that comes out before an unhelpful ERROR.
2000-11-26Fix for inserting/copying longer multibyte strings into bpchar dataTatsuo Ishii
types.
2000-11-26Unicode conversion fix suggested by Jan Varga...Tatsuo Ishii
-------------------------------------------------- Subject: Bug in unicode conversion ... From: Jan Varga <varga@utcru.sk> To: t-ishii@sra.co.jp Date: Sat, 18 Nov 2000 17:41:20 +0100 (CET) Hi, I tried this new feature in PostgreSQL. I found one bug. Script UCS_to_8859.pl skips input lines which 1. code <0x80 or 2. ucs <0x100 I think second one is not good idea because some codes in ISO8859-2 have ucs <0x100 (e.g. 0xE9 - 0x00E9) --------------------------------------------------
2000-11-25Make PGLC_setlocale() static, and document that it can't be used safelyTom Lane
for any other purpose than PGLC_localeconv()'s internal save/restore of locale settings. Fix cash.c to call PGLC_localeconv() rather than making a direct call to localeconv() --- the old way, if PGLC_localeconv() had already cached a locale result, it would be overwritten by the first cash_in or cash_out operation, leading to wrong-locale results later. Probably no demonstrable bug today, since we only appear to be looking at the LC_MONETARY results which should be the same anyway, but definitely a gotcha waiting to strike.
2000-11-25Fix some portability bugs I'd introduced into inet/cidr code ---Tom Lane
shifting by the word width is not defined by ANSI C...
2000-11-25Store current LC_COLLATE and LC_CTYPE settings in pg_control during initdb;Tom Lane
re-adopt these settings at every postmaster or standalone-backend startup. This should fix problems with indexes becoming corrupt due to failure to provide consistent locale environment for postmaster at all times. Also, refuse to start up a non-locale-enabled compilation in a database originally initdb'd with a non-C locale. Suppress LIKE index optimization if locale is not "C" or "POSIX" (are there any other locales where it's safe?). Issue NOTICE during initdb if selected locale disables LIKE optimization.
2000-11-25Fix elog logic so that error messages displayed during initdb (orTom Lane
other standalone-backend situations) are not duplicated. Remove some dead code, add some comments, too.
2000-11-25 here is a patch for formatting.c (to_char/timestampt()), for 7.1Bruce Momjian
it fixing Y,YY,YYY,YYYY conversion, the docs and regress tests update are included too. During the patch testing I found small bug in miscadmin.h in convertstr() declaration. Here it's fixed too. Thanks Karel
2000-11-25> > Looking some more, I found some other places that need a space (IBruce Momjian
> > suspect...), so here is an updated patch. > > This seems like the wrong way to go about it, because anytime anyone > changes any elog output anywhere, we'll risk another failure. If > syslog can't cope with empty lines, I think the right fix is for the > output-to-syslog routine to change the data just before sending --- > then there is only one place to fix. See the syslog output routine in > src/backend/utils/error/elog.c. Makes sense. Here's a new patch, now the output even looks better: Larry Rosenman
2000-11-25Rename GUC name from unixsocket to unix_socket_directoryBruce Momjian
2000-11-24A catalog cache that never caches isn't much of a cache :-(. Mea culpa.Tom Lane
Thanks to Brian Hirt for pointing out the performance lossage.