summaryrefslogtreecommitdiff
path: root/src/include/c.h
Commit message (Collapse)AuthorAgeFilesLines
* pgindent run for 8.2.Bruce Momjian2006-10-041-3/+4
|
* Rearrange MSVC errcode hack, fix incorrect _MSC_VER test. MagnusTom Lane2006-10-031-2/+4
|
* Move WIN32_ONLY_COMPILER define from c.h to win32.h because it was beingBruce Momjian2006-10-031-4/+1
| | | | defined too late.
* Return inline to win32.h because code was OK, but keep additionalBruce Momjian2006-08-101-12/+1
| | | | comment. 8.1.X is not affected by this commit.
* Move "#define inline __inline" from port/win32.h to c.h because Win32Bruce Momjian2006-08-101-1/+12
| | | | | | interface builds like libpq need it. Backpatch addition to 8.1.X.
* Fix definition of "errcode" for MSVC.Bruce Momjian2006-08-081-3/+1
| | | | Hiroshi Saito
* Don't use #include <crtdefs.h> for MSVC <= 1400.Bruce Momjian2006-07-291-1/+3
| | | | Hiroshi Saito
* DTrace support, with a small initial set of probesPeter Eisentraut2006-07-241-1/+2
| | | | by Robert Lor
* Attached patch is required ot build with the CRT that comes with VisualBruce Momjian2006-07-061-1/+4
| | | | | | | | | | Studio 2005. Basically MS defined errcode in the headers with a typedef, so we have to #define it out of the way. While at it, fix a function declaration in plpython that didn't match the implementation (volatile missing). Magnus Hagander
* Fix blank line.Bruce Momjian2006-06-261-2/+2
|
* Fix re-inclusion of port header file on Windows, per Magnus.Tom Lane2006-06-241-6/+3
|
* Prepare code to be built by MSVC:Bruce Momjian2006-06-071-15/+11
| | | | | | | | | | o remove many WIN32_CLIENT_ONLY defines o add WIN32_ONLY_COMPILER define o add 3rd argument to open() for portability o add include/port/win32_msvc directory for system includes Magnus Hagander
* Fix up pg_dump to do string escaping fully correctly for client encodingTom Lane2006-05-281-5/+6
| | | | | | | | | and standard_conforming_strings; likewise for the other client programs that need it. As per previous discussion, a pg_dump dump now conforms to the standard_conforming_strings setting of the source database. We don't use E'' syntax in the dump, thereby improving portability of the SQL. I added a SET escape_strings_warning = off command to keep the dumps from getting a lot of back-chatter from that.
* Use E'' strings internally only when standard_conforming_strings =Bruce Momjian2006-05-261-2/+9
| | | | | | | | | 'off'. This allows pg_dump output with standard_conforming_strings = 'on' to generate proper strings that can be loaded into other databases without the backslash doubling we typically do. I have added the dumping of the standard_conforming_strings value to pg_dump. I also added standard backslash handling for plpgsql.
* Repair a low-probability race condition identified by Qingqing Zhou.Tom Lane2006-04-141-1/+2
| | | | | | | | | | | | 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.
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-051-2/+2
|
* Improve STRINGS_H macro test for MSVC extensions.Bruce Momjian2006-03-051-3/+4
| | | | Add DLLIMPORT for V1 headers, in case Win32 don't export all symbols.
* Add workaround so MSVC doesn't try to load strings.h, which it doesn'tBruce Momjian2006-03-031-2/+3
| | | | | | have. This happens when MSVC uses pg_config.h generated by MinGW. Per report from Charles F. I. Savage
* Change MemSet to use long instead of int32, for better performance onPeter Eisentraut2006-02-161-13/+13
| | | | | | 64-bit platforms. by ITAGAKI Takahiro
* Allow MEMSET_LOOP_LIMIT to be set on a per-platform basis, and turn offBruce Momjian2006-02-031-8/+11
| | | | | | | 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.
* Remove BEOS port.Bruce Momjian2006-01-051-7/+1
|
* I have added these macros to c.h:Bruce Momjian2005-12-251-2/+3
| | | | | | | | | #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.
* Make Win32 build use our port/snprintf.c routines, instead of dependingTom Lane2005-12-061-4/+3
| | | | | 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.
* Make SQL arrays support null elements. This commit fixes the core arrayTom Lane2005-11-171-5/+5
| | | | | | | | 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.
* Standard pgindent run for 8.1.Bruce Momjian2005-10-151-8/+6
|
* Add comment about void* use in MemSet.Bruce Momjian2005-07-211-1/+2
|
* MemSet() must not cast its pointer argument to int32* until after it hasTom Lane2005-07-181-4/+5
| | | | | | | 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.
* Add E'' to internally created SQL strings that contain backslashes.Bruce Momjian2005-07-021-1/+3
| | | | Improve code clarity by using macros for E'' processing.
* Replace pg_shadow and pg_group by new role-capable catalogs pg_authidTom Lane2005-06-281-6/+2
| | | | | | | | 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.
* Change WAL-logging scheme for multixacts to be more like regularTom Lane2005-06-081-1/+3
| | | | | | 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.
* Add parentheses to macros when args are used in computations. WithoutBruce Momjian2005-05-251-3/+3
| | | | them, the executation behavior could be unexpected.
* Code cleanup: in C89, there is no point casting the first argument toNeil Conway2005-05-111-7/+7
| | | | | | 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.
* Implement sharable row-level locks, and use them for foreign key referencesTom Lane2005-04-281-2/+6
| | | | | | | | | | | | | | | 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.
* Convert oidvector and int2vector into variable-length arrays. ThisTom Lane2005-03-291-4/+29
| | | | | | | | | | | | | 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.
* Use _() macro consistently rather than gettext(). Add translationBruce Momjian2005-02-221-1/+3
| | | | macros around strings that were missing them.
* Document usage of gettext_noop().Bruce Momjian2005-02-151-1/+7
|
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-311-2/+2
| | | | | | | | 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 ...
* Add new macro as shorthand for MS VC and Borland C++:Bruce Momjian2004-09-271-2/+6
| | | | | | + #if defined(_MSC_VER) || defined(__BORLANDC__) + #define WIN32_CLIENT_ONLY + #endif
* More Win32 cleanups for Dave Page.Bruce Momjian2004-09-271-2/+2
|
* Remove references to the ODBC driver from the main source tree. From KrisNeil Conway2004-09-271-2/+1
| | | | Jurka.
* Use ULL not LL in UINT64CONST.Tom Lane2004-09-261-2/+2
|
* This patch attempts to note the use of the root.crt file in the server.Bruce Momjian2004-09-231-3/+6
| | | | | | | | 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
* Restructure subtransaction handling to reduce resource consumption,Tom Lane2004-09-161-2/+7
| | | | | | | | | | | | | | | | | 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.
* Fix #if defineBruce Momjian2004-09-101-2/+2
|
* Properly include port file for Cygwin.Bruce Momjian2004-09-101-3/+4
|
* Fix Cygwin defines to be consistent.Bruce Momjian2004-09-091-3/+3
|
* Pgindent run for 8.0.Bruce Momjian2004-08-291-7/+9
|
* Update copyright to 2004.Bruce Momjian2004-08-291-2/+2
|
* Use standard macro for psql binary file open. Add comment explainingBruce Momjian2004-07-111-1/+8
| | | | control-z requirement.
* Integrate src/timezone library for all platforms. There is more we canTom Lane2004-05-211-13/+1
| | | | | | 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.