summaryrefslogtreecommitdiff
path: root/src/backend/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix breakage of rules using NOTIFY actions, per bug report and patchTom Lane2001-01-031-1/+26
| | | | from sergiop@sinectis.com.ar.
* Repair always-broken date_part('quarter',timestamp).Thomas G. Lockhart2001-01-031-5/+5
| | | | | | | 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.
* Clean up non-reentrant interface for hash_seq/HashTableWalk, so thatTom Lane2001-01-023-140/+112
| | | | | | | | 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.
* New WAL version - CRC and data blocks backup.Vadim B. Mikheev2000-12-281-1/+47
|
* Let's try this again on accepting the correct range of Oid input valuesTom Lane2000-12-281-4/+11
| | | | for 64-bit platforms ...
* Fix portability problems recently exposed by regression tests on Alphas.Tom Lane2000-12-272-144/+29
| | | | | | | | | | 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.
* Replace overly-cute coding with code that (a) has defined behaviorTom Lane2000-12-231-11/+9
| | | | | 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.
* Small cleanup of temp-table handling. Disallow creation of a non-tempTom Lane2000-12-222-8/+16
| | | | | | | 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.)
* Repair not-too-well-thought-out code to do rangechecking of OIDs onTom Lane2000-12-221-52/+88
| | | | 64-bit machines. Also, make oidvectorin use the same code as oidin.
* Add 'ONLY' to queries generated by RI triggers, so as to preserve pre-7.1Tom Lane2000-12-221-25/+25
| | | | | semantics of RI operations. Eventually we ought to look at making RI work properly across inheritance trees, but not for 7.1 ...
* Change default output formatting for CIDR to be unabbreviated, perTom Lane2000-12-221-12/+50
| | | | | | 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.
* Clean up backend-exit-time cleanup behavior. Use on_shmem_exit callbacksTom Lane2000-12-182-37/+98
| | | | | | 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.
* here is a patch fixing today's bug report:Bruce Momjian2000-12-151-10/+71
| | | | | | | | | | | | | | | | | | | | > 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
* BugfixJan Wieck2000-12-141-1/+5
| | | | | | | | Trying to connect to template0 left a global referenced buffer because the scan of pg_database wasn't ended properly before elog(FATAL). Jan
* Fix ILIKE bug (only in multi-byte case)Tatsuo Ishii2000-12-111-23/+22
|
* Portability fix from Ryan Kirkpatrick's Alpha patches. I believe thisTom Lane2000-12-091-10/+6
| | | | is the only diff not accounted for by fmgr rewrite...
* Suppress compiler warnings.Tom Lane2000-12-091-2/+1
|
* Fix a bug in conversion from big5 to EUC_TW (CNS 11643-1992 Plane 3)Tatsuo Ishii2000-12-091-2/+2
| | | | Thanks Chih-Chang Hsieh <cch@cc.kmu.edu.tw> for finding the bug.
* Repair erroneous use of hashvarlena() for MACADDR, which is not aTom Lane2000-12-083-23/+96
| | | | | | | 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.
* REINDEX under WAL.Hiroshi Inoue2000-12-081-1/+60
|
* Change lpad() and rpad() to behave more Oracle-compatibly when targetTom Lane2000-12-071-23/+61
| | | | length is less than original string length.
* Make OVERLAPS operators conform to SQL92 spec regarding NULL handling.Tom Lane2000-12-072-60/+284
| | | | | | | | | | 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.
* Silence compiler warning.Tom Lane2000-12-071-3/+3
|
* Don't include miscadmin.h in elog.h, since the former is not part ofTom Lane2000-12-061-1/+2
| | | | the installed header file set.
* I've just seen what happens when the MEMORY_CONTEXT_CHECKING code firesTom Lane2000-12-051-9/+13
| | | | | 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.
* correctionsPeter Eisentraut2000-12-031-3/+3
|
* Ensure that all uses of <ctype.h> functions are applied to unsigned-charTom Lane2000-12-0318-137/+142
| | | | | values, whether the local char type is signed or not. This is necessary for portability. Per discussion on pghackers around 9/16/00.
* Repair usage of the OVERLAPS operator.Thomas G. Lockhart2000-12-031-3/+111
| | | | | | | | 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.
* Final(?) GUC clean-up. Update psql tab completion.Peter Eisentraut2000-12-031-4/+4
|
* Disable elog(ERROR|FATAL) in signal handlers inVadim B. Mikheev2000-12-031-2/+3
| | | | critical sections of code.
* Make elog() switch to ErrorContext while invoking libpq output routines,Tom Lane2000-12-011-10/+27
| | | | | | 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 ...
* Pursuant to a pghackers discussion back around 11-Jul-00, get rid of aset.c'sTom Lane2000-12-011-167/+204
| | | | | | | 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.
* It seems appropriate that the extended MEMORY_CONTEXT_CHECKING codeTom Lane2000-12-011-16/+27
| | | | | immediately uncovered three of Karel's own bugs, including a routine that scribbled on its input (naughty naughty!)
* Clean up MEMORY_CONTEXT_CHECKING code, and apply it more thoroughly. Also,Tom Lane2000-12-011-170/+202
| | | | | apply Karel Zak's patch to recycle residual space in an exhausted allocation block. (Bet you thought I'd forgot about that, Karel?)
* Make all commands that link a program look likePeter Eisentraut2000-11-301-4/+4
| | | | | | | $(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.
* Remove VARLENA_FIXED_SIZE hack, which is irreversibly broken now thatTom Lane2000-11-301-1/+49
| | | | | | | | 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.
* No more #ifdef XLOG.Vadim B. Mikheev2000-11-302-21/+3
|
* XLOG stuff for sequences.Vadim B. Mikheev2000-11-301-4/+9
| | | | CommitDelay in guc.c
* Get rid of not-very-portable fcntl(F_SETLK) mechanism for locking the UnixTom Lane2000-11-292-188/+214
| | | | | | | | | 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.)
* aclitemout() shouldn't coredump when it finds an ACL itemTom Lane2000-11-281-10/+21
| | | | | for a now-vanished group. Instead, display the numeric group ID, same as it does for vanished users.
* Significant cleanups in SysV IPC handling (shared mem and semaphores).Tom Lane2000-11-281-24/+8
| | | | | | | | | | | 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.
* Fix for inserting/copying longer multibyte strings into bpchar dataTatsuo Ishii2000-11-261-2/+20
| | | | types.
* Unicode conversion fix suggested by Jan Varga...Tatsuo Ishii2000-11-269-11/+565
| | | | | | | | | | | | | | | | | | | | -------------------------------------------------- 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) --------------------------------------------------
* Make PGLC_setlocale() static, and document that it can't be used safelyTom Lane2000-11-252-45/+57
| | | | | | | | | | | 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.
* Fix some portability bugs I'd introduced into inet/cidr code ---Tom Lane2000-11-251-6/+36
| | | | shifting by the word width is not defined by ANSI C...
* Store current LC_COLLATE and LC_CTYPE settings in pg_control during initdb;Tom Lane2000-11-252-9/+54
| | | | | | | | | | 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.
* Fix elog logic so that error messages displayed during initdb (orTom Lane2000-11-251-37/+26
| | | | | other standalone-backend situations) are not duplicated. Remove some dead code, add some comments, too.
* here is a patch for formatting.c (to_char/timestampt()), for 7.1Bruce Momjian2000-11-251-95/+179
| | | | | | | | | | | | 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
* > > Looking some more, I found some other places that need a space (IBruce Momjian2000-11-251-2/+11
| | | | | | | | | | | | | | > > 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
* Rename GUC name from unixsocket to unix_socket_directoryBruce Momjian2000-11-251-2/+2
|