Commit Graph

18089 Commits

Author SHA1 Message Date
Bruce Momjian a4c71af2c0 Put back canonicalization of PGDATA environment variable. 2004-07-12 19:15:14 +00:00
Bruce Momjian 76e7e2e776 Use strdup in pg_ctl for canonicalize_path on environment variable.
Simplify postmaster call too.
2004-07-12 18:17:13 +00:00
Bruce Momjian a0db74a35c This patch adds the following options to pg_dumpall, to be passed to
pg_dump:

-S, --superuser=NAME

-O, --no-owner

-X disable-dollar-quoting, --disable-dollar-quoting

-X disable-triggers, --disable-triggers

Christopher Kings-Lynne
2004-07-12 14:35:45 +00:00
Bruce Momjian 96b9dc1aef The attached patch, which incorporates the previous one sent and
currently unapplied regarding spi_internal.c, makes some additional
fixes relating to return types, and also contains the fix for
preventing  the use of insecure versions of Safe.pm.

There is one remaing return case that does not appear to work, namely
return of a composite directly in a select, i.e. if  foo returns some
composite type, 'select * from foo()' works but 'select foo()' doesn't.
We will either fix that or document it as a limitation.

The function plperl_func_handler is a mess - I will try to get it
cleaned up (and split up) in a subsequent patch, time permitting.

Also, reiterating previous advice - this changes slightly the API for
spi_exec_query - the returned object has either 2 or 3 members: 'status'
(string) and 'proceesed' (int,- number of rows) and, if rows are
returned, 'rows' (array of tuple hashes).

Andrew Dunstan
2004-07-12 14:31:04 +00:00
Bruce Momjian f4c5e06edf > win32 doesn't support a static initializer for mutexes, thus the first
> user must initialize the lock. The problem are concurrent "first" users
> - the pthread_mutex_t initialization must be synchronized.
> The current implementation is broken, the attached patches fixes that:
> mutex_initlock is a spinlock. If the pthread_mutex_t mutex is not
> initialized, then the spinlock is acquired, if the pthread_mutex_t is
> initialized if it's not yet initialized and then the spinlock is dropped.

Manfred Spraul
2004-07-12 14:23:28 +00:00
Bruce Momjian a29d26a3cd Back out thread fix until I get clarification. 2004-07-12 14:16:28 +00:00
Bruce Momjian a41463e31c win32 doesn't support a static initializer for mutexes, thus the first
user must initialize the lock. The problem are concurrent "first" users
- the pthread_mutex_t initialization must be synchronized.
The current implementation is broken, the attached patches fixes that:
mutex_initlock is a spinlock. If the pthread_mutex_t mutex is not
initialized, then the spinlock is acquired, if the pthread_mutex_t is
initialized if it's not yet initialized and then the spinlock is
dropped.

Manfred Spraul
2004-07-12 14:11:17 +00:00
Tom Lane c14a43f657 Remove TABLESPACE option of CREATE SEQUENCE; sequences will now always
live in database or schema's default tablespace, as per today's discussion.
Also, remove some unused keywords from the grammar (PATH, PENDANT,
VERSION), and fix ALSO, which was added as a keyword but not added
to the keyword classification lists, thus making it worse-than-reserved.
2004-07-12 05:38:11 +00:00
Bruce Momjian c5ff895c48 New text. 2004-07-12 03:58:34 +00:00
Bruce Momjian 298e58cbc4 Fix library_path with canonicalization. 2004-07-12 02:22:51 +00:00
Bruce Momjian 66d56a8efe Fix username mismatch in initdb. Magnus. 2004-07-12 01:54:10 +00:00
Bruce Momjian a919fdfd3d Wording improvement. 2004-07-12 01:37:01 +00:00
Bruce Momjian 7bcdf2ebee Tablespace examples for CREATE TABLE/INDEX/SCHEMA/DATABASE as well as
some other examples for CREATE DATABASE.

Gavin Sherry
2004-07-12 01:22:53 +00:00
Bruce Momjian 3095c104f0 Move comma. 2004-07-12 01:10:17 +00:00
Bruce Momjian eba9be883c The outer #define was forgotten. Attached patch adds it; please apply.
Alvaro
2004-07-12 01:00:45 +00:00
Bruce Momjian 098d0304d7 Add:
> * Add session start time and last statement time to pg_stat_activity
2004-07-12 00:39:11 +00:00
Bruce Momjian 1ec448cda3 Added Matthew:
<   rather than in /contrib
>   rather than in /contrib (Matthew)
515a516
> * Matthew T. O'Connor <matthew@zeut.net>
2004-07-12 00:23:59 +00:00
Bruce Momjian 233afe6a90 New Czech FAQ.
Pavel Stehule
2004-07-12 00:22:51 +00:00
Bruce Momjian 2bd17a5f52 Add FAQ entry on hardware selection. 2004-07-12 00:18:57 +00:00
Bruce Momjian 118ec0daa8 Canonicalize preload_libraries after it is split up, not before. 2004-07-12 00:09:07 +00:00
Bruce Momjian 0589ab68c5 Remove:
< * Allow moving sequences and toast tables to other tablespaces
2004-07-11 23:52:05 +00:00
Bruce Momjian 421089dc35 Cleanup for canonicalization fixes, from Tom. 2004-07-11 23:49:51 +00:00
Bruce Momjian a1f3209c07 Add:
> * Allow moving sequences and toast tables to other tablespaces
2004-07-11 23:31:27 +00:00
Bruce Momjian 8dbd10d96d This patch fixes a small error in the Porting PL/SQL to PL/pgSQL
section where a instr function parameter is mistyped as varchar. It
works properly when changed to integer.

Michael Glaesemann
2004-07-11 23:26:51 +00:00
Bruce Momjian cf9fd800ec Example for create function using argument names
Gavin Sherry
2004-07-11 23:23:43 +00:00
Tom Lane af4de81469 ALTER TABLE SET TABLESPACE. Gavin Sherry, some rework by Tom Lane. 2004-07-11 23:13:58 +00:00
Bruce Momjian 08d89db34d Update German FAQ> 2004-07-11 23:07:18 +00:00
Bruce Momjian d7c89ea9b2 Update URL's for mysql conversion tools. 2004-07-11 22:52:18 +00:00
Bruce Momjian 5c9d069daf Add:
> * Add NOVICE output level for helpful messages like automatic sequence/index creation
2004-07-11 21:57:03 +00:00
Bruce Momjian 5ff9566686 Remove postgresql.conf of 'info' as a valid client_min_messages level. 2004-07-11 21:48:25 +00:00
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