summaryrefslogtreecommitdiff
path: root/src/include/c.h
AgeCommit message (Collapse)Author
2006-04-14Repair a low-probability race condition identified by Qingqing Zhou.Tom Lane
If a process abandons a wait in LockBufferForCleanup (in practice, only happens if someone cancels a VACUUM) just before someone else sends it a signal indicating the buffer is available, it was possible for the wakeup to remain in the process' semaphore, causing misbehavior next time the process waited for an lmgr lock. Rather than try to prevent the race condition directly, it seems best to make the lock manager robust against leftover wakeups, by having it repeat waiting on the semaphore if the lock has not actually been granted or denied yet.
2006-03-05Update copyright for 2006. Update scripts.Bruce Momjian
2006-03-05Improve STRINGS_H macro test for MSVC extensions.Bruce Momjian
Add DLLIMPORT for V1 headers, in case Win32 don't export all symbols.
2006-03-03Add workaround so MSVC doesn't try to load strings.h, which it doesn'tBruce Momjian
have. This happens when MSVC uses pg_config.h generated by MinGW. Per report from Charles F. I. Savage
2006-02-16Change MemSet to use long instead of int32, for better performance onPeter Eisentraut
64-bit platforms. by ITAGAKI Takahiro
2006-02-03Allow MEMSET_LOOP_LIMIT to be set on a per-platform basis, and turn offBruce Momjian
MemSet on AIX by setting MEMSET_LOOP_LIMIT to zero. Add optimization to skip MemSet tests in MEMSET_LOOP_LIMIT == 0 case and just call memset() directly.
2006-01-05Remove BEOS port.Bruce Momjian
2005-12-25I have added these macros to c.h:Bruce Momjian
#define HIGHBIT (0x80) #define IS_HIGHBIT_SET(ch) ((unsigned char)(ch) & HIGHBIT) and removed CSIGNBIT and mapped it uses to HIGHBIT. I have also added uses for IS_HIGHBIT_SET where appropriate. This change is purely for code clarity.
2005-12-06Make Win32 build use our port/snprintf.c routines, instead of dependingTom Lane
on libintl which may or may not provide what we need. Make a few marginal cleanups to ensure this works. Andrew Dunstan and Tom Lane.
2005-11-17Make SQL arrays support null elements. This commit fixes the core arrayTom Lane
functionality, but I still need to make another pass looking at places that incidentally use arrays (such as ACL manipulation) to make sure they are null-safe. Contrib needs work too. I have not changed the behaviors that are still under discussion about array comparison and what to do with lower bounds.
2005-10-15Standard pgindent run for 8.1.Bruce Momjian
2005-07-21Add comment about void* use in MemSet.Bruce Momjian
2005-07-18MemSet() must not cast its pointer argument to int32* until after it hasTom Lane
checked that the pointer is actually word-aligned. Casting a non-aligned pointer to int32* is technically illegal per the C spec, and some recent versions of gcc actually generate bad code for the memset() when given such a pointer. Per report from Andrew Morrow.
2005-07-02Add E'' to internally created SQL strings that contain backslashes.Bruce Momjian
Improve code clarity by using macros for E'' processing.
2005-06-28Replace pg_shadow and pg_group by new role-capable catalogs pg_authidTom Lane
and pg_auth_members. There are still many loose ends to finish in this patch (no documentation, no regression tests, no pg_dump support for instance). But I'm going to commit it now anyway so that Alvaro can make some progress on shared dependencies. The catalog changes should be pretty much done.
2005-06-08Change WAL-logging scheme for multixacts to be more like regularTom Lane
transaction IDs, rather than like subtrans; in particular, the information now survives a database restart. Per previous discussion, this is essential for PITR log shipping and for 2PC.
2005-05-25Add parentheses to macros when args are used in computations. WithoutBruce Momjian
them, the executation behavior could be unexpected.
2005-05-11Code cleanup: in C89, there is no point casting the first argument toNeil Conway
memset() or MemSet() to a char *. For one, memset()'s first argument is a void *, and further void * can be implicitly coerced to/from any other pointer type.
2005-04-28Implement sharable row-level locks, and use them for foreign key referencesTom Lane
to eliminate unnecessary deadlocks. This commit adds SELECT ... FOR SHARE paralleling SELECT ... FOR UPDATE. The implementation uses a new SLRU data structure (managed much like pg_subtrans) to represent multiple- transaction-ID sets. When more than one transaction is holding a shared lock on a particular row, we create a MultiXactId representing that set of transactions and store its ID in the row's XMAX. This scheme allows an effectively unlimited number of row locks, just as we did before, while not costing any extra overhead except when a shared lock actually has to be shared. Still TODO: use the regular lock manager to control the grant order when multiple backends are waiting for a row lock. Alvaro Herrera and Tom Lane.
2005-03-29Convert oidvector and int2vector into variable-length arrays. ThisTom Lane
change saves a great deal of space in pg_proc and its primary index, and it eliminates the former requirement that INDEX_MAX_KEYS and FUNC_MAX_ARGS have the same value. INDEX_MAX_KEYS is still embedded in the on-disk representation (because it affects index tuple header size), but FUNC_MAX_ARGS is not. I believe it would now be possible to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet. There are still a lot of vestigial references to FUNC_MAX_ARGS, which I will clean up in a separate pass. However, getting rid of it altogether would require changing the FunctionCallInfoData struct, and I'm not sure I want to buy into that.
2005-02-22Use _() macro consistently rather than gettext(). Add translationBruce Momjian
macros around strings that were missing them.
2005-02-15Document usage of gettext_noop().Bruce Momjian
2004-12-31Tag appropriate files for rc3PostgreSQL Daemon
Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
2004-09-27Add new macro as shorthand for MS VC and Borland C++:Bruce Momjian
+ #if defined(_MSC_VER) || defined(__BORLANDC__) + #define WIN32_CLIENT_ONLY + #endif
2004-09-27More Win32 cleanups for Dave Page.Bruce Momjian
2004-09-27Remove references to the ODBC driver from the main source tree. From KrisNeil Conway
Jurka.
2004-09-26Use ULL not LL in UINT64CONST.Tom Lane
2004-09-23This patch attempts to note the use of the root.crt file in the server.Bruce Momjian
Given that PostgreSQL will output a message complaining about it's absence if you're using SSL mode, I feel it's important that it gets a mention in the documentation at some point. Dominic Mitchell
2004-09-16Restructure subtransaction handling to reduce resource consumption,Tom Lane
as per recent discussions. Invent SubTransactionIds that are managed like CommandIds (ie, counter is reset at start of each top transaction), and use these instead of TransactionIds to keep track of subtransaction status in those modules that need it. This means that a subtransaction does not need an XID unless it actually inserts/modifies rows in the database. Accordingly, don't assign it an XID nor take a lock on the XID until it tries to do that. This saves a lot of overhead for subtransactions that are only used for error recovery (eg plpgsql exceptions). Also, arrange to release a subtransaction's XID lock as soon as the subtransaction exits, in both the commit and abort cases. This avoids holding many unique locks after a long series of subtransactions. The price is some additional overhead in XactLockTableWait, but that seems acceptable. Finally, restructure the state machine in xact.c to have a more orthogonal set of states for subtransactions.
2004-09-10Fix #if defineBruce Momjian
2004-09-10Properly include port file for Cygwin.Bruce Momjian
2004-09-09Fix Cygwin defines to be consistent.Bruce Momjian
2004-08-29Pgindent run for 8.0.Bruce Momjian
2004-08-29Update copyright to 2004.Bruce Momjian
2004-07-11Use standard macro for psql binary file open. Add comment explainingBruce Momjian
control-z requirement.
2004-05-21Integrate src/timezone library for all platforms. There is more we canTom Lane
and should do now that we control our own destiny for timezone handling, but this commit gets the bulk of the picayune diffs in place. Magnus Hagander and Tom Lane.
2004-05-07Solve the 'Turkish problem' with undesirable locale behavior for caseTom Lane
conversion of basic ASCII letters. Remove all uses of strcasecmp and strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp; remove most but not all direct uses of toupper and tolower in favor of pg_toupper and pg_tolower. These functions use the same notions of case folding already developed for identifier case conversion. I left the straight locale-based folding in place for situations where we are just manipulating user data and not trying to match it to built-in strings --- for example, the SQL upper() function is still locale dependent. Perhaps this will prove not to be what's wanted, but at the moment we can initdb and pass regression tests in Turkish locale.
2004-05-05Second try at a portable unsetenv().Tom Lane
2004-04-30Suppress use of timezone library by ecpg.Bruce Momjian
2004-04-30Minor adjustments to enable public-domain timezone library to be calledBruce Momjian
from our code.
2004-03-10Move non-blocking code into its own /port file, for code clarity.Bruce Momjian
2004-01-10Remove the following unused type definitions: bool8, bool16, bool32, word8,Neil Conway
word16, and word32.
2003-12-20This patch is the next step towards (re)allowing fork/exec.Bruce Momjian
Claudio Natoli
2003-11-29make sure the $Id tags are converted to $PostgreSQL as well ...PostgreSQL Daemon
2003-10-21Revert to 7.3-and-before practice of only including <fcntl.h> in c.hTom Lane
on Windows; per complaint from Andreas that it breaks AIX build.
2003-10-14Remove void* in MemSet until we understand the gcc 3.3.1 problem better.Bruce Momjian
2003-10-11Add void * cast to MemSet to silence compiler, and add comment that weBruce Momjian
already check for alignment.
2003-09-21Arrange to align shared disk buffers on at least 32-byte boundaries,Tom Lane
not just MAXALIGN boundaries. This makes a noticeable difference in the speed of transfers to and from kernel space, at least on recent Pentiums, and might help other CPUs too. We should look at making this happen for local buffers and buffile.c too. Patch from Manfred Spraul.
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian