Commit Graph

18059 Commits

Author SHA1 Message Date
Bruce Momjian 7b0f060d54 Use canonicalize_path for -D, GUC paths, and paths coming in from
environment variables.
2004-07-11 21:34:04 +00:00
Tom Lane 8801110b20 Move TablespaceCreateDbspace() call into smgrcreate(), which is where it
probably should have been to begin with; this is to cover cases like
needing to recreate the per-db directory during WAL replay.
Also, fix heap_create to force pg_class.reltablespace to be zero instead
of the database's default tablespace; this makes the world safe for
CREATE DATABASE to handle all tables in the default tablespace alike,
as per previous discussion.  And force pg_class.reltablespace to zero
when creating a relation without physical storage (eg, a view); this
avoids possibly having dangling references in this column after a
subsequent DROP TABLESPACE.
2004-07-11 19:52:52 +00:00
Tom Lane 94d4d240bb Rename XLOG_BTREE_NEWPAGE xlog record type into XLOG_HEAP_NEWPAGE, and
shift support code into heapam.c accordingly.  This is in service of
soon-to-be-committed ALTER TABLE SET TABLESPACE code that will want to
use this same record type for both heaps and indexes.

Theoretically I should have forced initdb for this, but in practice there
is no change in xlog contents because CVS tip will never really emit this
record type anyhow...
2004-07-11 18:01:45 +00:00
Bruce Momjian 98e9775a3a Use standard macro for psql binary file open. Add comment explaining
control-z requirement.
2004-07-11 13:29:16 +00:00
Tom Lane c8c40bbc9e Cause the format of BC timestamptz output to be 'datetime zone BC' rather
than 'datetime BC zone', because the former is accepted by the timestamptz
input converter while the latter may not be depending on spacing.  This
is not a loss of compatibility w.r.t. 7.4 and before, because until very
recently there was never a case where we'd output both zone and 'BC'.
2004-07-11 04:57:20 +00:00
Bruce Momjian 59429adea9 Add:
> * Allow moving system tables to other tablespaces, where possible
2004-07-11 03:10:50 +00:00
Bruce Momjian ff2fbacc42 Fix trim_trailing_separator() to not trim c:\ nor \\network\ on Win32. 2004-07-11 02:59:42 +00:00
Bruce Momjian eee93173d4 Add:
> * Allow changing of already-created database and schema tablespaces
2004-07-11 02:03:22 +00:00
Bruce Momjian 330c6c42be Open files in binary mode on Win32 so control-z isn't seen as EOF. 2004-07-11 00:54:55 +00:00
Bruce Momjian e5ca4bde79 Add:
> *  Add an option to sync() before fsync()'ing checkpoint files
2004-07-11 00:28:30 +00:00
Bruce Momjian 6063d11464 Add:
<
> * Use a phantom command counter for nested subtransactions to reduce
>   tuple overhead
2004-07-11 00:26:36 +00:00
Bruce Momjian 130f89e93f Allow configuration files to be placed outside the data directory.
Add new postgresql.conf variables to point to data, pg_hba.conf, and
pg_ident.conf files.

Needs more documentation.
2004-07-11 00:18:45 +00:00
Bruce Momjian b4a98c5fcc Add:
> * Add include functionality to postgresql.conf
>
2004-07-11 00:18:28 +00:00
Tom Lane 5dfd5063e2 Defend against overrun of ExtraOptions array --- strictly paranoia,
since the person or script starting the postmaster has to be trusted
anyway.
2004-07-10 23:29:16 +00:00
Tom Lane 99b225c528 Check more test points (in fact, every week in 1970..2004) to get a more
accurate matching of our time zone to the system's zone.  This method is
able to distinguish Antarctica/Casey from Australia/Perth, as in Chris
K-L's recent example; and it is not materially slower than before, because
the extra checks generally don't get done against very many time zones.

It seems possible that with this test we'd be able to correctly identify
Windows timezones without looking at the timezone name, but I do not
have the ability to try it.
2004-07-10 23:06:50 +00:00
Tom Lane b9f698eccb Fix BSD-only coding in port.c (passing a local variable to putenv).
Also a quick but half-baked attempt to make trim_trailing_separator
do the right thing with path consisting only of '/' --- still needs
work for Windows I think.
2004-07-10 22:58:42 +00:00
Tom Lane 82f755ec80 Test HAVING condition before computing targetlist of an Aggregate node.
This is required by SQL spec to avoid failures in cases like
  SELECT sum(win)/sum(lose) FROM ... GROUP BY ... HAVING sum(lose) > 0;
AFAICT we have gotten this wrong since day one.  Kudos to Holger Jakobs
for being the first to notice.
2004-07-10 18:39:23 +00:00
Bruce Momjian afa035c204 Clarify schema meanings in pg_dump manual page by referring to object
definitions more frequently.
2004-07-10 15:51:28 +00:00
Bruce Momjian 732f2fda82 Add --enable-thread-safety-force to force a thread compile even if the
OS thread tests fail.
2004-07-10 01:24:29 +00:00
Bruce Momjian 4525418451 Add OSX thread support for next 7.4.X 2004-07-07 13:04:45 +00:00
Bruce Momjian f8d390402b Formatting improvements:
< The most recent version of this document can be viewed at
< the PostgreSQL web site, http://www.PostgreSQL.org.
> The most recent version of this document can be viewed at the PostgreSQL web site, http://www.PostgreSQL.org.
2004-07-07 12:48:54 +00:00
Bruce Momjian b4e660e352 Regenerate:
> #A dash (-) marks changes that will appear in the upcoming 7.5 release.#
2004-07-07 12:45:50 +00:00
Bruce Momjian 8f599aa6ea regenerate. 2004-07-07 12:45:16 +00:00
Bruce Momjian aec271475a Bold dash line.
> \#A dash (-) marks changes that will appear in the upcoming 7.5 release.#
2004-07-07 12:44:34 +00:00
Bruce Momjian a08baad671 Update highlighting of dash. 2004-07-07 12:25:02 +00:00
Bruce Momjian ea0078da2d Move section:
< * Add replication of distributed databases
< 	o Automatic failover
< 	o Load balancing
< 	o Master/slave replication
< 	o Multi-master replication
< 	o Partition data across servers
< 	o Queries across databases or servers (two-phase commit)
< 	o Allow replication over unreliable or non-persistent links
55a48,55
> * Improve replication solutions
> 	o Automatic failover
> 	o Load balancing
> 	o Master/slave replication
> 	o Multi-master replication
> 	o Partition data across servers
> 	o Queries across databases or servers (two-phase commit)
> 	o Allow replication over unreliable or non-persistent links
2004-07-06 20:29:31 +00:00
Bruce Momjian 28c4dd14cd Add comment describing ereport() NOTICE/WARNING distinction. 2004-07-06 19:51:59 +00:00
Bruce Momjian 33fe94b286 Reorder dash mention to be more prominient.
> A dash (-) marks changes that will appear in the upcoming 7.5 release.
>
> Bracketed items "[]" have more detail.
9,12d12
<
< A dash (-) marks changes that will appear in the upcoming 7.5 release.
<
< Bracketed items "[]" have more detail.
2004-07-06 16:18:31 +00:00
Tom Lane 07b4c48b6a Fix broken logic for pretty-printing parenthesis-suppression in UNION
et al.
2004-07-06 04:50:21 +00:00
Bruce Momjian a21bb2722a Done:
> * -Fix upper()/lower() to work for multibyte encodings
2004-07-06 03:23:31 +00:00
Tom Lane a0e592141e Revert broken rpath addition. 2004-07-05 23:24:12 +00:00
Tom Lane ab50ed8f57 Fix unchecked mallocs/strdups added by recent placeholder-config-vars
patch.

Thomas Hallgren
2004-07-05 23:14:14 +00:00
Michael Meskes 1fcaceeae0 Added free() calls against memory leak in interval.c. 2004-07-05 18:51:51 +00:00
Michael Meskes 073f7312a4 - Fixed indicator in SET DESCRIPTOR.
- Added special handling of descriptor header information.
- Some code cleanup.
2004-07-05 09:45:54 +00:00
Bruce Momjian da09dea3e3 Fix paragraph mention in ALTER DATABASE manual page.
Christopher Kings-Lynne
2004-07-05 02:34:43 +00:00
Bruce Momjian 9535ab9c85 Allow plperl to compile with Perl 5.05.
Andrew Dunstan
2004-07-05 02:18:31 +00:00
Tom Lane 959b353db2 Fix misspellings: langauge -> language. 2004-07-04 23:34:24 +00:00
Michael Meskes 8715789928 Made sure SET DESCRIPTOR accepts all data types including constants. 2004-07-04 15:02:24 +00:00
Tom Lane a72dd7a9e4 Okay, I've had it with answering newbie questions about why plpgsql
FOR loops are giving weird syntax errors.  Restructure parsing of FOR
loops so that the integer-loop-vs-query-loop decision is driven off
the presence of '..' between IN and LOOP, rather than the presence
of a matching record/row variable name.  Hopefully this will make the
behavior a bit more transparent.
2004-07-04 02:49:04 +00:00
Tom Lane f5c798ee82 Fix no-longer-correct bit-pushing in TransactionIdSetStatus, per Alvaro. 2004-07-03 02:55:56 +00:00
Tom Lane e34082ee3b Add missing operators of the form interval-plus-datetime, as required for
better SQL compliance in this area, per recent discussion.  Mark related
operators as commutators where possible.  (The system doesn't actually care
about commutator marking for operators not returning boolean, at the moment,
but this seems forward-thinking and besides it made it easier to verify
that we hadn't missed any.)
Also, remove interval-minus-time and interval-minus-timetz operators.
I'm not sure how these got in, but they are nonstandard and had very
obviously broken behavior.  (minus is not commutative in anyone's book.)
I doubt anyone had ever used 'em, because we'd surely have gotten a bug
report about it if so.
2004-07-02 22:50:23 +00:00
Joe Conway 0b89d261c7 Andreas Pflug wrote:
From an idea of Bruce, the attached patch implements the function
 pg_tablespace_databases(oid) RETURNS SETOF oid
 which delivers as set of database oids having objects in the selected
 tablespace, enabling an admin to examine only the databases affecting
 the tablespace for objects instead of scanning all of them.

initdb forced
2004-07-02 18:59:25 +00:00
Peter Eisentraut 6d6c8b0d96 Translation update 2004-07-02 15:07:10 +00:00
Joe Conway cd4fd672dd Attached is a 1 line bug fix for dbmirror that was submitted.
It fixes a bug where some transactions could be dropped when writing
mirrored SQL statements to files.
-- Steven Singer
2004-07-02 00:58:09 +00:00
Tom Lane 25ee160acd More paranoia in AtEOSubXact_SPI: don't assume we can safely use SPI_finish
for cleaning up.  It seems possible that the memory contexts SPI_finish
would try to touch are already gone; and there's no need for SPI itself
to delete them, since the containing contexts will surely be going away
anyway at transaction end.
2004-07-01 21:17:13 +00:00
Joe Conway 1732cb0dbe plperl update from Andrew Dunstan, deriving (I believe) from Command Prompt's
plperlNG. Review and minor cleanup/improvements by Joe Conway.

Summary of new functionality:
- Shared data space and namespace. There is a new global variable %_SHARED
  that functions can use to store and save data between invocations of a
  function, or between different functions. Also, all trusted plperl function
  now share a common Safe container (this is an optimization, also), which
  they can use for storing non-lexical variables, functions, etc.
- Triggers are now supported
- Records can now be returned (as a hash reference)
- Sets of records can now be returned (as a reference to an array of hash
  references).
- New function spi_exec_query() provided for performing db functions or
  getting data from db.
- Optimization for counting hash keys (Abhijit Menon-Sen)
- Allow return of 'record' and 'setof record'
2004-07-01 20:50:22 +00:00
Tom Lane b6197fe069 Further review of xact.c state machine for nested transactions. Fix
problems with starting subtransactions inside already-failed transactions.
Clean up some comments.
2004-07-01 20:11:03 +00:00
Michael Meskes e15d0bb8e8 Removed unused variable and added a typecast. 2004-07-01 18:32:58 +00:00
Joe Conway 13629df5a1 Add double metaphone code from Andrew Dunstan. Also change metaphone so that
an empty input string causes an empty output string to be returned, instead of
throwing an ERROR -- per complaint from Aaron Hillegass, and consistent with
double metaphone. Fix examples in README.soundex pointed out by James Robinson.
2004-07-01 03:25:48 +00:00
Tom Lane 77a436ba55 Fix seriously nasty memory leak in new TransactionIdIsInProgress code. 2004-07-01 03:13:05 +00:00