summaryrefslogtreecommitdiff
path: root/src/backend/utils
Commit message (Collapse)AuthorAgeFilesLines
* Make pgsql compile on FreeBSD-alpha.Bruce Momjian2000-11-161-7/+7
| | | | | | | | | | | | | | | | | | Context diff this time. Remove -m486 compile args for FreeBSD-i386, compile -O2 on i386. Compile with only -O on alpha for codegen safety. Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD. Fix a lot of bogus string formats for outputting pointers (cast to int and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now cast to 'unsigned long' and output with %lu/ Remove an unused variable. Alfred Perlstein
* Syslog Facility PatchBruce Momjian2000-11-161-15/+111
| | | | | | Here is one with a stray character removed. Larry Rosenman
* Rename parameter "hostname" to "virtual_host". Seemed very ambiguous...Peter Eisentraut2000-11-151-2/+2
|
* Clean up array-dimensions parser a bit.Tom Lane2000-11-141-41/+57
| | | | This code still needs a lot of love, however ...
* Small polishing of syslog facility and ident settings. Only allow settingPeter Eisentraut2000-11-142-15/+19
| | | | | at postmaster start, rename syslog_progid to syslog_ident, since syslog itself uses that term, fix doc markup.
* Extend CREATE DATABASE to allow selection of a template database to beTom Lane2000-11-143-32/+26
| | | | | | | | | | cloned, rather than always cloning template1. Modify initdb to generate two identical databases rather than one, template0 and template1. Connections to template0 are disallowed, so that it will always remain in its virgin as-initdb'd state. pg_dumpall now dumps databases with restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0. This allows proper behavior when there is user-added data in template1. initdb forced!
* Rename PortName to PortNumber.Bruce Momjian2000-11-141-3/+3
|
* Ok, You guys are probably tired of me, BUT, here is another one, thatBruce Momjian2000-11-132-3/+48
| | | | | | | | | | | | | adds the facility to set the program name used in syslog. (this includes the other ones). One gotcha, the parser doesn't like special characters in strings. For example, i tried to use pg-test, and if failed the parse coming from the postgresql.conf file. I don't think it's a showstopper.. Larry Rosenman
* UUNET is looking into offering PostgreSQL as a part of a managed webBruce Momjian2000-11-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hosting product, on both shared and dedicated machines. We currently offer Oracle and MySQL, and it would be a nice middle-ground. However, as shipped, PostgreSQL lacks the following features we need that MySQL has: 1. The ability to listen only on a particular IP address. Each hosting customer has their own IP address, on which all of their servers (http, ftp, real media, etc.) run. 2. The ability to place the Unix-domain socket in a mode 700 directory. This allows us to automatically create an empty database, with an empty DBA password, for new or upgrading customers without having to interactively set a DBA password and communicate it to (or from) the customer. This in turn cuts down our install and upgrade times. 3. The ability to connect to the Unix-domain socket from within a change-rooted environment. We run CGI programs chrooted to the user's home directory, which is another reason why we need to be able to specify where the Unix-domain socket is, instead of /tmp. 4. The ability to, if run as root, open a pid file in /var/run as root, and then setuid to the desired user. (mysqld -u can almost do this; I had to patch it, too). The patch below fixes problem 1-3. I plan to address #4, also, but haven't done so yet. These diffs are big enough that they should give the PG development team something to think about in the meantime :-) Also, I'm about to leave for 2 weeks' vacation, so I thought I'd get out what I have, which works (for the problems it tackles), now. With these changes, we can set up and run PostgreSQL with scripts the same way we can with apache or proftpd or mysql. In summary, this patch makes the following enhancements: 1. Adds an environment variable PGUNIXSOCKET, analogous to MYSQL_UNIX_PORT, and command line options -k --unix-socket to the relevant programs. 2. Adds a -h option to postmaster to set the hostname or IP address to listen on instead of the default INADDR_ANY. 3. Extends some library interfaces to support the above. 4. Fixes a few memory leaks in PQconnectdb(). The default behavior is unchanged from stock 7.0.2; if you don't use any of these new features, they don't change the operation. David J. MacKenzie
* Keep track of the last active slot in the shared ProcState array, soTom Lane2000-11-122-64/+23
| | | | | | | | | that search loops only have to scan that far and not through all maxBackends entries. This eliminates a performance penalty for setting maxBackends much higher than the average number of active backends. Also, eliminate no-longer-used 'backend tag' concept. Remove setting of environment variables at backend start (except for CYR_RECODE), since none of them are being examined by the backend any longer.
* Allow interpretation of INTERVALs with more timezone-like syntax.Thomas G. Lockhart2000-11-113-8/+183
| | | | | | Define conversions to and from text for date, time, and timetz. Have millisecond and microsecond return full # of seconds in those units. Previously, only returned full fractional part in those units.
* Adjust INET/CIDR display conventions and reimplement some INET/CIDRTom Lane2000-11-102-91/+107
| | | | | | | functions, per recent discussions on pghackers. For now, I have called the verbose-display formatting function text(), but will reconsider if enough people object. initdb forced.
* Use SearchSysCacheTupleCopy() instead of SearchSysCacheTuple() inHiroshi Inoue2000-11-101-2/+3
| | | | | order to continue to access the tuple more than now. This would resolve a segmentation fault error.
* Clean up syscache so that recursive invocation is safe, and remove errorTom Lane2000-11-103-450/+307
| | | | | | | | message about recursive use of a syscache. Also remove most of the specialized indexscan routines in indexing.c --- it turns out that catcache.c is perfectly able to perform the indexscan for itself, in fact has already looked up all the information needed to do so! This should be faster as well as needing far less boilerplate code.
* Auto checkpoint creation.Vadim B. Mikheev2000-11-091-1/+14
|
* Make DROP TABLE rollback-able: postpone physical file delete until commit.Tom Lane2000-11-083-337/+175
| | | | | | | | | (WAL logging for this is not done yet, however.) Clean up a number of really crufty things that are no longer needed now that DROP behaves nicely. Make temp table mapper do the right things when drop or rename affecting a temp table is rolled back. Also, remove "relation modified while in use" error check, in favor of locking tables at first reference and holding that lock throughout the statement.
* This somehow gets moot. Is there a way to make gcc reject those comments?Bruce Momjian2000-11-071-2/+2
| | | | Andreas
* Fix INTERVAL output when year/month has different sign as day/hour etc.Thomas G. Lockhart2000-11-062-108/+210
| | | | | | | | | | | | | | Previously, all fields were unsigned, with only a trailing "ago" to indicate negative intervals. Now, ISO format does not use "ago", and and the traditional PostgreSQL format has the first numeric field unsigned with "ago" supporting that field. So "1 month - 2 days ago" is two days less than a month in the past. Fix interval arithmetic across daylight savings time boundaries. Previously, most math across boundaries introduced a one hour offset. Allow some date/time functions to return NULL if called with NULL args. Implement functions for AT TIME ZONE support. Support "SAT" as an Australian time zone if USE_AUSTRALIAN_RULES is defined.
* Allow ORDER BY, LIMIT in sub-selects. Fix most (not all) cases whereTom Lane2000-11-051-2/+6
| | | | | | the grammar did not allow redundant parentheses around sub-selects. Distinguish LIMIT ALL from LIMIT 0; make the latter behave as one would expect.
* Make the backend grok relative paths for the data directory by convertingPeter Eisentraut2000-11-041-1/+57
| | | | it to an absolute path.
* Fix bug reported by bobson: aclinsert3 would delete the 'world' entryTom Lane2000-11-031-32/+38
| | | | | from an ACL list if it had no permissions remaining, which confused aclcheck terribly. Also clean up code a little.
* Add runtime configuration options to control permission bits and groupPeter Eisentraut2000-11-011-2/+9
| | | | owner of unix socket.
* Change the parser to convert SQL "position" and "substring" syntax toPeter Eisentraut2000-10-311-3/+99
| | | | | | | | | | position() and substring() functions, so that it works transparently for bit types as well. Alias the text functions appropriately. Add position() for bit types. Add new constant node T_BitString that represents literals of the form B'1001 and pass those to zpbit type.
* Add support for code conversion between Unicode and other encodings.Tatsuo Ishii2000-10-3038-26759/+141337
| | | | | | Supported encodings are: EUC_JP, EUC_CN, EUC_KR, EUC_TW, Shift JIS, Big5, ISO8859-[1-5]. TODO: testings! and documentations...
* include pg_wchar.h to import a fucntion prototype of pg_mbcliplenTatsuo Ishii2000-10-301-1/+5
|
* USE_POSIX_TIME replaced by HAVE_TM_ZONE || HAVE_INT_TIMEZONE, which arePeter Eisentraut2000-10-295-95/+68
| | | | | | | | equivalent. In linux.h there were some #undef HAVE_INT_TIMEZONE, which are useless because HAVE_TM_ZONE overrides it anyway, and messing with configure results isn't cool.
* #define JMP_BUF has been unnecessary since the arrival of the sigsetjmpPeter Eisentraut2000-10-281-5/+1
| | | | test.
* WALVadim B. Mikheev2000-10-282-5/+61
|
* Remove gcc-only macro definitionTatsuo Ishii2000-10-271-1/+13
|
* Disallow bits beyond the mask length for CIDR values, per discussionTom Lane2000-10-271-16/+50
| | | | | | | on pghackers. Arrange for the sort ordering of general INET values to be network part as major sort key, host part as minor sort key. I did not force an initdb for this change, but anyone who's running indexes on general INET values may need to recreate those indexes.
* Re-implement LIMIT/OFFSET as a plan node type, instead of a hack inTom Lane2000-10-261-3/+15
| | | | | | ExecutorRun. This allows LIMIT to work in a view. Also, LIMIT in a cursor declaration will behave in a reasonable fashion, whereas before it was overridden by the FETCH count.
* Support SET/SHOW/RESET client_encoding and server_encoding even whenTom Lane2000-10-253-88/+4
| | | | | | MULTIBYTE support is not compiled (you just can't set them to anything but SQL_ASCII). This should reduce interoperability problems between MB-enabled clients and non-MB-enabled servers.
* Minor cleanup.Tom Lane2000-10-251-10/+4
|
* Integer binary operators, from Marko Kreen <marko@l-t.ee>. Renamed bitxorPeter Eisentraut2000-10-242-2/+182
| | | | operator to '#' for consistency. Parser still needs work.
* New relcache hash table with RelFileNode as key to be usedVadim B. Mikheev2000-10-231-16/+84
| | | | | | | from bufmgr - it would be nice to have separate hash in smgr for node <--> fd mappings, but for the moment it's easy to add new hash to relcache. Fixed small bug in xlog.c:ReadRecord.
* Makeover for Unixware 7.1.1Peter Eisentraut2000-10-221-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile: Add more standard targets. Improve shell redirection in GNU make detection. * src/backend/access/transam/rmgr.c: Fix incorrect(?) C. * src/backend/libpq/pqcomm.c (StreamConnection): Work around accept() bug. * src/include/port/unixware.h: ...with help from here. * src/backend/nodes/print.c (plannode_type): Remove some "break"s after "return"s. * src/backend/tcop/dest.c (DestToFunction): ditto. * src/backend/nodes/readfuncs.c: Add proper prototypes. * src/backend/utils/adt/numutils.c (pg_atoi): Cope specially with strtol() setting EINVAL. This saves us from creating an extra set of regression test output for the affected systems. * src/include/storage/s_lock.h (tas): Correct prototype. * src/interfaces/libpq/fe-connect.c (parseServiceInfo): Don't use variable as dimension in array definition. * src/makefiles/Makefile.unixware: Add support for GCC. * src/template/unixware: same here * src/test/regress/expected/abstime-solaris-1947.out: Adjust whitespace. * src/test/regress/expected/horology-solaris-1947.out: Part of this file was evidently missing. * src/test/regress/pg_regress.sh: Fix shell. mkdir -p returns non-zero if the directory exists. * src/test/regress/resultmap: Add entries for Unixware.
* Add support for VPATH builds, that is, building somewhere else than in thePeter Eisentraut2000-10-203-42/+16
| | | | | | | | | source directory. This involves mostly makefiles using $(srcdir) when they might have used ".". (Regression tests don't work with this, yet.) Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS). Add "override" keyword in most places, to preserve necessary flags even when the user overrode the flags.
* Improve comments.Tom Lane2000-10-191-2/+15
|
* Remove NO_SECURITY define.Bruce Momjian2000-10-161-3/+1
|
* New file naming. Database OID is used as "tablespace" id andVadim B. Mikheev2000-10-163-3/+41
| | | | | relation OID is used as file node on creation but may be changed later if required. Regression Tests Approved (c) -:)))
* Support for conversion between UNICODE and other encodingsTatsuo Ishii2000-10-1214-438/+27865
| | | | | currently ISO8859-[1-5] and EUC_JP are supported. support for other encodings will be coming soon.
* Fix temp relation handling for indexes, cleanupBruce Momjian2000-10-111-20/+9
|
* Oops, back out my unintended changes.Bruce Momjian2000-10-111-7/+2
|
* Update make_mkidBruce Momjian2000-10-111-2/+7
|
* Add runtime configuration option "silent_mode".Tatsuo Ishii2000-10-081-1/+2
| | | | This is equivalent to postmaster's -S option.
* The beos port in the source tree doesn't even compile. and evenBruce Momjian2000-10-071-4/+4
| | | | | | | | | | | | | | | | | | | | | after that dynamic loading isn't working and shared memory handling is broken. Attached with this message, there is a Zip file which contain : * beos.diff = patch file generated with difforig * beos = folder with beos support files which need to be moved in / src/backend/port * expected = foler with three file for message and precision difference in regression test * regression.diff = rule problem (need to kill the backend manualy) * dynloader = dynloader files (they are also in the pacth files, but there is so much modification that I have join full files) Everything works except a problem in 'rules' Is there some problems with rules in the current tree ? It used to works with last week tree. Cyril VELTER
* Arrange that no database accesses are attempted during parser() --- thisTom Lane2000-10-071-25/+59
| | | | | | | | | | | | | | | took some rejiggering of typename and ACL parsing, as well as moving parse_analyze call out of parser(). Restructure postgres.c processing so that parse analysis and rewrite are skipped when in abort-transaction state. Only COMMIT and ABORT statements will be processed beyond the raw parser() phase. This addresses problem of parser failing with database access errors while in aborted state (see pghackers discussions around 7/28/00). Also fix some bugs with COMMIT/ABORT statements appearing in the middle of a single query input string. Function, operator, and aggregate arguments/results can now use full TypeName production, in particular foo[] for array types. DROP OPERATOR and COMMENT ON OPERATOR were broken for unary operators. Allow CREATE AGGREGATE to accept unquoted numeric constants for initcond.
* Fix silly typo that led to 'tleIsArrayAssign: I'm confused' message.Tom Lane2000-10-051-2/+2
| | | | Indeed it was.
* Add proofreader's changes to docs.Bruce Momjian2000-10-052-24/+24
| | | | Fix misspelling of disbursion to dispersion.
* Reimplementation of UNION/INTERSECT/EXCEPT. INTERSECT/EXCEPT now meet theTom Lane2000-10-051-22/+190
| | | | | | | | | | | SQL92 semantics, including support for ALL option. All three can be used in subqueries and views. DISTINCT and ORDER BY work now in views, too. This rewrite fixes many problems with cross-datatype UNIONs and INSERT/SELECT where the SELECT yields different datatypes than the INSERT needs. I did that by making UNION subqueries and SELECT in INSERT be treated like subselects-in-FROM, thereby allowing an extra level of targetlist where the datatype conversions can be inserted safely. INITDB NEEDED!