Commit Graph

17817 Commits

Author SHA1 Message Date
Bruce Momjian
a28d04e6ee This patch updates pgpipe() on win32 to log exactly which part of the
call fails when it does. (As it is now, there is no way to figure out
the point of error). Shouldn't be a problem since it's most defintily
not a performance-critical path (only called on pgstat startup ATM).

This should help us debug the pipe error message that's on the win32
status page (which I myself have never been able to reproduce, and thus
haven't figured out a better way to debug yet)

Magnus Hagander
2004-06-11 03:48:35 +00:00
Tom Lane
7643bed58e When using extended-query protocol, postpone planning of unnamed statements
until Bind is received, so that actual parameter values are visible to the
planner.  Make use of the parameter values for estimation purposes (but
don't fold them into the actual plan).  This buys back most of the
potential loss of plan quality that ensues from using out-of-line
parameters instead of putting literal values right into the query text.

This patch creates a notion of constant-folding expressions 'for
estimation purposes only', in which case we can be more aggressive than
the normal eval_const_expressions() logic can be.  Right now the only
difference in behavior is inserting bound values for Params, but it will
be interesting to look at other possibilities.  One that we've seen
come up repeatedly is reducing now() and related functions to current
values, so that queries like ... WHERE timestampcol > now() - '1 day'
have some chance of being planned effectively.

Oliver Jowett, with some kibitzing from Tom Lane.
2004-06-11 01:09:22 +00:00
Bruce Momjian
5fe8c7d6e5 More restructuring to use Win32 START with paths needing quotes. 2004-06-11 00:57:25 +00:00
Bruce Momjian
6cc4175b25 Attached is a patch that takes care of the PATHSEP issue. I made a more
extensive change then what was suggested. I found the file path.c that
contained a lot of "Unix/Windows" agnostic functions so I added a function
there instead and removed the PATHSEP declaration in exec.c altogether. All
to keep things from scattering all over the code.

I also took the liberty of changing the name of the functions
"first_path_sep" and "last_path_sep". Where I come from (and I'm apparently
not alone given the former macro name PATHSEP), they should be called
"first_dir_sep" and "last_dir_sep". The new function I introduced, that
actually finds path separators, is now the "first_path_sep". The patch
contains changes on all affected places of course.

I also changed the documentation on dynamic_library_path to reflect the
chagnes.

Thomas Hallgren
2004-06-10 22:26:24 +00:00
Bruce Momjian
d4117de50a More quoting cleanups for Win32's pg_ctl. 2004-06-10 22:20:53 +00:00
Tom Lane
3485cc3a7c Adjust cost_nonsequential_access() to have more reasonable behavior
when random_page_cost has a small value.  Per Manfred Koizar, though
I didn't use his equation exactly.
2004-06-10 21:02:00 +00:00
Bruce Momjian
387b38bec4 Done:
> * -Print table names with constraint names in error messages, or make constraint
2004-06-10 19:04:49 +00:00
Tom Lane
36af1dd299 Make ALTER TABLE ADD SERIAL work reasonably in inheritance cases, too. 2004-06-10 18:34:45 +00:00
Tom Lane
6121aed8a5 Fix oversight in recent ALTER TABLE improvements. We now support
ALTER TABLE tab ADD COLUMN col SERIAL, but we forgot to install the
dependency between the column and the sequence, so the sequence
would not go away if you dropped the table later.
2004-06-10 18:25:02 +00:00
Bruce Momjian
c9d327b866 Use /B to start so a new window isn't created, per Andrew Dunstan. 2004-06-10 18:02:36 +00:00
Tom Lane
45616f5bbb Clean up generation of default names for constraints, indexes, and serial
sequences, as per recent discussion.  All these names are now of the
form table_column_type, with digits added if needed to make them unique.
Default constraint names are chosen to be unique across their whole schema,
not just within the parent object, so as to be more SQL-spec-compatible
and make the information schema views more useful.
2004-06-10 17:56:03 +00:00
Bruce Momjian
75db5a665f Add START background code for another code path, per Andrew Dunstan. 2004-06-10 17:45:09 +00:00
Bruce Momjian
3a854af433 Use START for pg_ctl background runs on Win32, from Magnus. 2004-06-10 17:26:14 +00:00
Peter Eisentraut
6de9abc359 Translation update 2004-06-10 17:18:14 +00:00
Peter Eisentraut
1159c484b2 New translation 2004-06-10 17:10:24 +00:00
Bruce Momjian
10a3d19ad4 Handle multiple double-quoted strings using Win32's system() call.
Document limitations.
2004-06-10 16:35:18 +00:00
Bruce Momjian
93db6f6ae2 Reword:
< * Allow hash buckets to fill disk pages, rather than being sparse
> * Pack hash index buckets onto disk pages more efficiently
2004-06-10 11:56:27 +00:00
Bruce Momjian
13c30084f6 Add:
> * Allow pg_dump to use multiple -t and -n switches
2004-06-10 04:33:51 +00:00
Bruce Momjian
741681b7b2 Modify:
< * Order heap pointers on hash index pages by hash value and ctid
> * Allow hash buckets to fill disk pages, rather than being sparse
2004-06-10 04:06:21 +00:00
Bruce Momjian
c7099997ac Add Brazilian version of FAQ.
Euler Taveira de Oliveira
2004-06-10 03:46:11 +00:00
Bruce Momjian
babd02af5a Add:
> * Order heap pointers on hash index pages by hash value and ctid
2004-06-10 03:45:30 +00:00
Bruce Momjian
6d1347b36f Add pg_ctl native language files for Russian.
Serguei A. Mokhov
2004-06-10 02:59:22 +00:00
Bruce Momjian
659660c116 Add regression tests for CSV COPY format. 2004-06-09 23:39:24 +00:00
Tom Lane
337f802460 Fix slightly-wrong syntax error messages from bootstrap parser, as per
report from Tom Cook.
2004-06-09 19:49:56 +00:00
Tom Lane
7e64dbc6b5 Support assignment to subfields of composite columns in UPDATE and INSERT.
As a side effect, cause subscripts in INSERT targetlists to do something
more or less sensible; previously we evaluated such subscripts and then
effectively ignored them.  Another side effect is that UPDATE-ing an
element or slice of an array value that is NULL now produces a non-null
result, namely an array containing just the assigned-to positions.
2004-06-09 19:08:20 +00:00
Bruce Momjian
3a0df651da Use single quotes around pg_dump call from pg_dumpall. 2004-06-09 17:37:28 +00:00
Bruce Momjian
dc6c8c2d06 Use single quotes for pg_ctl system call. 2004-06-09 17:36:07 +00:00
Bruce Momjian
7ac67fd189 Add time.h to pg_dumpall. 2004-06-09 17:05:14 +00:00
Bruce Momjian
36b8654cb0 Use mkstemp instead of mktemp in thread test, per Jan. 2004-06-09 15:16:17 +00:00
Bruce Momjian
a1ccbb9019 Previous code cleanup was for bufpage.c, not bufmgr.c.
This cleanup just cleans up a comment.
2004-06-09 13:11:34 +00:00
Bruce Momjian
69616f96ec Add:
> * Add ON COMMIT capability to CREATE TABLE AS SELECT
2004-06-09 03:15:51 +00:00
Tom Lane
32af13f03d Add missing check for too-few-inputs when replacing a zero-dimensional
array.
2004-06-08 20:28:21 +00:00
Bruce Momjian
327d86ca99 Fix mingw link check by using double-brackets. 2004-06-08 14:06:35 +00:00
Bruce Momjian
ce04221a1e Stylistic changes in bufmgr.c
Basically replaces (*a).b with a->b as it is everywhere else in
	Postgres.

Manfred Koizar
2004-06-08 14:00:35 +00:00
Bruce Momjian
5e926cbb6b vacuum.c refactoring
. rename variables
     . cur_buffer -> dst_buffer
     . ToPage -> dst_page
     . cur_page -> dst_vacpage
   . move variable declarations into block where variable is used
   . various Asserts instead of elog(ERROR, ...)
   . extract functionality from repair_frag() into new routines
     . move_chain_tuple()
     . move_plain_tuple()
     . update_hint_bits()
   . create type ExecContext
   . add comments

Manfred Koizar
2004-06-08 13:59:36 +00:00
Bruce Momjian
cd8b0fc5f1 Change PGETC to PGSYSCONFDIR and PGLOCALE to PGLOCALEDIR, per Peter. 2004-06-08 13:49:23 +00:00
Bruce Momjian
b2a17038d7 Have strerror_r return "Unknown error". 2004-06-08 01:45:50 +00:00
Bruce Momjian
a63d2168e9 Fix strerror_r by checking return type from configure. 2004-06-07 22:39:45 +00:00
Bruce Momjian
9136613803 Add start/stop times for pg_dump/pg_dumpall when verbose output is used. 2004-06-07 20:35:57 +00:00
Teodor Sigaev
e25a6e185b Remove asymetrical word processing in query and text 2004-06-07 16:48:18 +00:00
Bruce Momjian
613c684a60 Update date. 2004-06-07 15:11:23 +00:00
Tom Lane
982d005d62 Some preliminary documentation for composite-type stuff. 2004-06-07 04:04:47 +00:00
Tom Lane
7845bfc095 Dept of second thoughts: don't use the new wide-character upper/lower
code if we are running in a single-byte encoding.  No point in the
extra overhead in that case.
2004-06-06 22:17:01 +00:00
Tom Lane
b8312c5fe7 Add some regression tests for composite-type operations. 2004-06-06 21:20:46 +00:00
Tom Lane
bb3da43e3b Allow use of table rowtypes directly as column types of other tables.
Instead of prohibiting that, put code into ALTER TABLE to reject ALTERs
that would affect other tables' columns.  Eventually we will probably
want to extend ALTER TABLE to actually do something useful here, but
in the meantime it seems wrong to forbid the feature completely just
because ALTER isn't fully baked.
2004-06-06 20:30:07 +00:00
Tom Lane
19e3bdd6c7 Minor catalog cleanups for composite-type stuff. Adjust signatures shown
in pg_proc for record_in, record_out, etc to reflect that these routines
now make use of the second OID parameter.  Remove the ancient SET entry
in pg_type, which is now highly unlikely to ever become used again.
Adjust type_sanity regression test to match.
2004-06-06 19:07:02 +00:00
Tom Lane
62c3e61e50 Add binary I/O support for composite types. 2004-06-06 18:06:25 +00:00
Tom Lane
f24c5098fd Remove finger from dike: composite types are now allowed as table columns.
Still a few things to do, like binary I/O and regression tests and docs,
but might as well let people play with the toy.
2004-06-06 04:52:55 +00:00
Tom Lane
a3704d3dec Preliminary support for composite type I/O; just text for now,
no binary yet.
2004-06-06 04:50:28 +00:00
Tom Lane
c541bb86e9 Infrastructure for I/O of composite types: arrange for the I/O routines
of a composite type to get that type's OID as their second parameter,
in place of typelem which is useless.  The actual changes are mostly
centralized in getTypeInputInfo and siblings, but I had to fix a few
places that were fetching pg_type.typelem for themselves instead of
using the lsyscache.c routines.  Also, I renamed all the related variables
from 'typelem' to 'typioparam' to discourage people from assuming that
they necessarily contain array element types.
2004-06-06 00:41:28 +00:00