Commit Graph

13064 Commits

Author SHA1 Message Date
Bruce Momjian f4c069ca8f Here is a patch required to build plperl with win32. The issues were:
* perl_useshrplib gets set to "yes" and not to "true". I assume it's set
to "true" on unix, so I left both.
* Need to translate backslashes into slashes
* The linker config coming out of perl was for MSVC and not for mingw

Magnus Hagander
2004-07-16 19:18:24 +00:00
Bruce Momjian 036ecf7afb > pg_ctl --help
>  ---skiped---
>   -P       user name of account to register PostgreSQL server
>   -U       password  of account to register PostgreSQL server
> ---skiped---
>
> I think that isn't right ;)

Claudio Natoli
2004-07-15 15:23:32 +00:00
Tom Lane 473165aff8 For a SQL function declared to return a named composite type, make
sure the tuple datums it returns actually show that type and not RECORD.
2004-07-15 13:51:38 +00:00
Bruce Momjian 93a1fce5cc Add permission display to \db+. 2004-07-15 03:56:06 +00:00
Peter Eisentraut a837ed88b1 Detect locale/encoding mismatch in initdb, or pick a suitable encoding
automatically if none was specified.
2004-07-14 17:55:10 +00:00
Bruce Momjian bbcee544aa Have \dn+ show permissions and description for schemas.
Dennis Bjorklund
2004-07-13 16:48:16 +00:00
Bruce Momjian dc0e76ca36 Change pg_dump to use ALTER OWNER commands instead of SET SESSION
AUTHORIZATION commands by default.  Move all GRANT and REVOKE commands
to the end of the dump to avoid restore failures in several situations.
Bring back --use-set-session-authorization option to get previous SET
behaviour

Christopher Kings-Lyne
2004-07-13 03:00:17 +00:00
Tom Lane e419c84c56 Can't have blank lines in resultmap; some versions of expr complain. 2004-07-13 02:55:25 +00:00
Bruce Momjian 6577f178e6 Add new join file. 2004-07-13 02:54:08 +00:00
Bruce Momjian ca95bcb1d8 Move tablespace name up on to the same line in psql \d. 2004-07-13 02:46:21 +00:00
Bruce Momjian 74f7630093 Rename join ordering named join_1.out 2004-07-13 02:05:09 +00:00
Tom Lane 9df3086972 Cause libpq and ecpg libraries to be built as proper shared libraries
(.dylib format) on Mac OS X, while not messing up loadable modules for
the backend (which are the same kind of animal as a shared library on
every other platform, but not here).  Also get the naming convention
to match OS X practice, viz libFOO.version.so not libFOO.so.version.
In support of that last, refactor code in Makefile.shlib to make it
easier to have platform-specific shlib naming conventions.
This patch is loosely based on the Fink project's current postgresql.patch.
Tested by yours truly on OS X 10.3.4; does anyone have 10.2.* to check
it on?
2004-07-13 00:06:46 +00:00
Bruce Momjian b6335b4fb4 Add tablespace location display for psql \d.
Gavin Sherry
2004-07-12 20:41:13 +00:00
Bruce Momjian e47cbb3bad Add has_tablespace_privilege().
Christopher Kings-Lynne
2004-07-12 20:23:59 +00:00
Bruce Momjian 1a0f3e476b Add Win32-specific join ordering. 2004-07-12 20:11:37 +00:00
Bruce Momjian 15c8fd70e8 Add blank line to new canonicalize_path file, which handles "a b\" properly. 2004-07-12 19:27:31 +00:00
Bruce Momjian 5ee0a8dcb6 canonicalization adjustments. 2004-07-12 19:18:18 +00:00
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 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 eba9be883c The outer #define was forgotten. Attached patch adds it; please apply.
Alvaro
2004-07-12 01:00:45 +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 421089dc35 Cleanup for canonicalization fixes, from Tom. 2004-07-11 23:49:51 +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 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 ff2fbacc42 Fix trim_trailing_separator() to not trim c:\ nor \\network\ on Win32. 2004-07-11 02:59:42 +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 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
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 28c4dd14cd Add comment describing ereport() NOTICE/WARNING distinction. 2004-07-06 19:51:59 +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
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