summaryrefslogtreecommitdiff
path: root/src/include
AgeCommit message (Collapse)Author
2001-02-13Please apply the following patch to fix AIX and IRIX timestamp behaviorBruce Momjian
as previously discussed. It makes AIX and IRIX not use DST for dates before 1970. The following expected files need to be removed from the regression tests, they contain wrong results and are not needed any more. src/test/regress/expected/horology-1947-PDT.out src/test/regress/expected/tinterval-1947-PDT.out src/test/regress/expected/abstime-1947-PDT.out Zeugswetter Andreas
2001-02-13Clean up portability problems in regexp package: change all routineTom Lane
definitions from K&R to ANSI C style, and fix broken assumption that int and long are the same datatype. This repairs problems observed on Alpha with regexps having between 32 and 63 states.
2001-02-12Hmm, this isn't used either.Tom Lane
2001-02-12Remove unused and largely-broken-anyway compatibility defs.Tom Lane
2001-02-12Rearrange order of operations in heap_create_with_catalog so that ifTom Lane
two transactions create the same table name concurrently, the one that fails will complain about unique index pg_class_relname_index, rather than about pg_type_typname_index which'll confuse most people. Free side benefit: pg_class.reltype is correctly linked to the pg_type entry now. It's been zero in all but the preloaded pg_class entries since who knows when.
2001-02-10Fix byte-vs-word-width oversight in m68k TAS() code.Tom Lane
Man, this brings back some old memories ...
2001-02-10Restructure the key include files per recent pghackers discussion: thereTom Lane
are now separate files "postgres.h" and "postgres_fe.h", which are meant to be the primary include files for backend .c files and frontend .c files respectively. By default, only include files meant for frontend use are installed into the installation include directory. There is a new make target 'make install-all-headers' that adds the whole content of the src/include tree to the installed fileset, for use by people who want to develop server-side code without keeping the complete source tree on hand. Cleaned up a whole lot of crufty and inconsistent header inclusions.
2001-02-09I have deleted the include of termios.h in include/port/qnx4.h.Bruce Momjian
Then I recompiled pgsql and I have compiled a program with ecpg. I have removed the termios.h, and the ECHO hack. Thanks Maurizio
2001-02-09plpgsql's private copy of xlateSqlType was out of sync. Again. ThisTom Lane
is clearly not maintainable, so dike it out in favor of calling the real version in the backend's gram.y.
2001-02-07Macro for btree runtime fix.Vadim B. Mikheev
2001-02-07Actually, it looks like DEF_PGPORT belongs over in config.h.win32 forTom Lane
the Windows build...
2001-02-06Out-of-bounds memory allocation request sizes should be treated as justTom Lane
elog(ERROR) not an Assert trap, since we've downgraded out-of-memory to elog(ERROR) not a fatal error. Also, change the hard boundary from 256Mb to 1Gb, just so that anyone who's actually got that much memory to spare can play with TOAST objects approaching a gigabyte.
2001-02-02Apply patches for QNX from MaurizioBruce Momjian
2001-01-29Clean up handling of tuple descriptors so that result-tuple descriptorsTom Lane
allocated by plan nodes are not leaked at end of query. This doesn't really matter for normal queries, but it sure does for queries invoked repetitively inside SQL functions. Clean up some other grotty code associated with tupdescs, and fix a few other memory leaks exposed by tests with simple SQL functions.
2001-01-27Here is an update on the Win32 patch. Modified files are 'config.h.win32'Bruce Momjian
and two 'win32.mak'. Addresses the following: 1) Oops. Spelled fcntl.h wrong in the last one. D'uh. 2) PG_VERSION changed to be defined with " around it. psql/command.c failed to compile without that. 3) Changed makefiles to use "/MD" and link both psql and libpq.dll against MSVCRT.DLL instead of a static library. This takes care of the crash-upon-free in psql. I *think* this is what is on the "Open 7.1 Items" list as "Magnus Hagander ODBC Issues?". It has nothing to do with ODBC, but it's the only issue I've been involved with... Magnus Hagander
2001-01-27Re-read Unix-socket lock file every so often (every CheckPoint interval,Tom Lane
actually) to ensure that its file access time doesn't get old enough to tempt a /tmp directory cleaner to remove it. Still another reason we should never have put the sockets in /tmp in the first place ...
2001-01-25Re-implement deadlock detection and resolution, per design notes postedTom Lane
to pghackers on 18-Jan-01.
2001-01-24Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian
2001-01-24Add all possible config file options.Bruce Momjian
2001-01-24Here is a patch to make the current snapshot compile on Win32 (native, libpqBruce Momjian
and psql) again. Changes are: 1) psql requires the includes of "io.h" and "fcntl.h" in command.c in order to make a call to open() work (io.h for _open(), fcntl.h for the O_xxx) 2) PG_VERSION is no longer defined in version.h[.in], but in configure.in. Since we don't do configure on native win32, we need to put it in config.h.win32 :-( 3) Added define of SYSCONFDIR to config.h.win32 - libpq won't compile without it. This functionality is *NOT* tested - it's just defined as "" for now. May work, may not. 4) DEF_PGPORT renamed to DEF_PGPORT_STR I have done the "basic tests" on it - it connects to a database, and I can run queries. Haven't tested any of the fancier functions (yet). However, I stepped on a much bigger problem when fixing psql to work. It no longer works when linked against the .DLL version of libpq (which the Makefile does for it). I have left it linked against this version anyway, pending the comments I get on this mail :-) The problem is that there are strings being allocated from libpq.dll using PQExpBuffers (for example, initPQExpBuffer() on line 92 of input.c). These are being allocated using the malloc function used by libpq.dll. This function *may* be different from the malloc function used by psql.exe - only the resulting pointer must be valid. And with the default linking methods, it *WILL* be different. Later, psql.exe tries to free() this string, at which point it crashes because the free() function can't find the allocated block (it's on the allocated blocks list used by the runtime lib of libpq.dll). Shouldn't the right thing to do be to have psql call termPQExpBuffer() on the data instead? As it is now, gets_fromFile() will just return the pointer received from the PQExpBuffer.data (this may well be present at several places - this is the one I was bitten by so far). Isn't that kind of "accessing the internals of the PQExpBuffer structure" wrong? Instead, perhaps it shuold make a copy of the string, adn then termPQExpBuffer() it? In that case, the string will have been allocated from within the same library as the free() is called. I can get it to work just fine by doing this - changing from (around line 100 of input.c): and the same a bit further down in the same function. But, as I said above, this may be at more places in the code? Perhaps someone more familiar to it could comment on that? What do you think shuld be done about this? Personally, I go by the "If you allocate a piece of memory using an interface, use the same interface to free it", but the question is how to make it work :-) Also, AFAIK this only affects psql.exe, so the changes made to the libpq this patch are required no matter how the other issue is handled. Regards, Magnus
2001-01-23Fix all the places that called heap_update() and heap_delete() withoutTom Lane
bothering to check the return value --- which meant that in case the update or delete failed because of a concurrent update, you'd not find out about it, except by observing later that the transaction produced the wrong outcome. There are now subroutines simple_heap_update and simple_heap_delete that should be used anyplace that you're not prepared to do the full nine yards of coping with concurrent updates. In practice, that seems to mean absolutely everywhere but the executor, because *noplace* else was checking.
2001-01-23Fix some int4->int32.Bruce Momjian
2001-01-23Rename int4 to int32 in a few places.Bruce Momjian
2001-01-22Remove rangechecks on errno; just call strerror unconditionally. ThisTom Lane
eliminates a raft of portability issues, including whether sys_nerr exists, whether the platform has any valid negative errnos, etc. The downside is minimal: errno shouldn't ever contain an invalid value anyway, and if it does, reasonably modern versions of strerror will not choke. This rangecheck idea seemed good at the time, but it's clearly a net loss, and I apologize to all concerned for having ever put it in.
2001-01-22Clean up lockmanager data structures some more, in preparation for plannedTom Lane
rewrite of deadlock checking. Lock holder objects are now reachable from the associated LOCK as well as from the owning PROC. This makes it practical to find all the processes holding a lock, as well as all those waiting on the lock. Also, clean up some of the grottier aspects of the SHMQueue API, and cause the waitProcs list to be stored in the intuitive direction instead of the nonintuitive one. (Bet you didn't know that the code followed the 'prev' link to get to the next waiting process, instead of the 'next' link. It doesn't do that anymore.)
2001-01-22Clean up per-tuple memory leaks in trigger firing and plpgsqlTom Lane
expression evaluation.
2001-01-22All the global memory contexts should be DLLIMPORT, if any are.Tom Lane
2001-01-21Deal with C++ incompatibility of sys_nerr declaration by taking it outTom Lane
of c.h altogether, and putting it into the only places that use it (elog.c and exc.c), instead. Modify these routines to check for a NULL or empty-string return from strerror, too, since some platforms define strerror to return empty string for unknown errors (what a useless definition that is ...). Clean up some cruft in ExcPrint while at it.
2001-01-20Add missing piece of BitString support to node output functions. ExpandPeter Eisentraut
and remove IsA_Value macro.
2001-01-20Still further tweaking of s_lock assembler: do not assume that leadingTom Lane
whitespace is unimportant in assembly code. Also, move VAX definition of typedef slock_t to port header files to be like all the other ports. Note that netbsd.h and openbsd.h are now identical, and I rather think that freebsd.h is broken in the places where it doesn't agree --- but I'll leave it to the freebsders to look at that.
2001-01-19From Jason Tishler <jt@dothill.com>Peter Eisentraut
* doc/FAQ_MSWIN: Update to be consistent with software -- mainly change comment from lack of Cygwin UNIX domain socket support and to list of current Cygwin UNIX domain socket issues. * src/include/config.h.in: Enable UNIX domain sockets for Cygwin. * src/include/port/win.h: Disable UNIX domain sockets for Cygwin b20.1. * src/test/regress/pg_regress.sh: Use UNIX domain sockets for Cygwin instead of TCP/IP.
2001-01-19Make critical sections (elog->crash) and interrupt holdoff sectionsTom Lane
into distinct concepts, per recent discussion on pghackers.
2001-01-19cleanup.Bruce Momjian
2001-01-19Remove ; and add \n to ASM code.Bruce Momjian
2001-01-19Fix alignmentBruce Momjian
2001-01-19Fix univel asm alignmentBruce Momjian
2001-01-19Add __volatile__ to all __asm__ and make consistent indentingBruce Momjian
2001-01-19New ASM format:Bruce Momjian
/* * Standard __asm__ format: * * __asm__( * "command;" * "command;" * "command;" * : "=r"(_res) return value, in register * : "r"(lock) argument, 'lock pointer', in register * : "r0"); inline code uses this register */
2001-01-18Fix VAX ASM '1 f' -> '1f'.Bruce Momjian
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-17Move structure comments from the top block down to the line entries forBruce Momjian
this file to match all the other files, and to be clearer.
2001-01-16Oops, I had managed to break query-cancel-while-waiting-for-lock.Tom Lane
2001-01-16Rename fields of lock and lockholder structures to something a tad lessTom Lane
confusing, and clean up documentation.
2001-01-14pg_database's datpath column must not be marked toastable, becauseTom Lane
GetRawDatabaseInfo() won't cope with a compressed path spec (much less a moved-off one). I'm not going to force an initdb for this change, because it's noncritical --- we're not actually using datpath at all right now. But it seems a good idea to apply the fix while I'm thinking about it.
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-11Add DLLIMPORT to TransactionCommandContext.Peter Eisentraut
2001-01-09Add configure check for sys_nerr, to end all discussions.Peter Eisentraut
2001-01-09The KAME files md5.* and sha1.* have the following changelogBruce Momjian
entry: ---------------------------- revision 1.2 date: 2000/12/04 01:20:38; author: tgl; state: Exp; lines: +18 -18 Eliminate some of the more blatant platform-dependencies ... it builds here now, anyway ... ---------------------------- Which basically changes u_int*_t -> uint*_t, so now it does not compile neither under Debian 2.2 nor under NetBSD 1.5 which is platform independent<B8> all right. Also it replaces $KAME$ with $Id$ which is Bad Thing. PostgreSQL Id should be added as a separate line so the file history could be seen. So here is patch: * changes uint*_t -> uint*. I guess that was the original intention * adds uint64 type to include/c.h because its needed [somebody should check if I did it right] * adds back KAME Id, because KAME is the master repository * removes stupid c++ comments in pgcrypto.c * removes <sys/types.h> from the code, its not needed -- marko Marko Kreen
2001-01-09Fix oversight in planning of GROUP queries: when an expression is usedTom Lane
as both a GROUP BY item and an output expression, the top-level Group node should just copy up the evaluated expression value from its input, rather than re-evaluating the expression. Aside from any performance benefit this might offer, this avoids a crash when there is a sub-SELECT in said expression.