Commit Graph

20138 Commits

Author SHA1 Message Date
Tom Lane b72e5fa17b Adjust time qual checking code so that we always check TransactionIdIsInProgress
before we check commit/abort status.  Formerly this was done in some paths
but not all, with the result that a transaction might be considered
committed for some purposes before it became committed for others.
Per example found by Jan Wieck.
2005-05-07 21:22:01 +00:00
Tom Lane 4cd4ed0cc2 Fix case in which a debug printout would print already-pfreed data. 2005-05-07 18:14:25 +00:00
Bruce Momjian 8a9e32912e Add description:
<   Currently locale can only be set during initdb.
>   Currently locale can only be set during initdb.  No global tables have
>   locale-aware columns.  However, the database template used during
>   database creation might have locale-aware indexes.  The indexes would
>   need to be reindexed to match the new locale.
2005-05-07 15:45:23 +00:00
Bruce Momjian 3adba41a3c Add comment on C locale test for upper/lower/initcap(). 2005-05-07 15:18:17 +00:00
Neil Conway d733f110cd Revert the ld --as-needed patch. This breaks Fedora Core 3, due to a strange
interaction between ld, readline, termcap, and psql. The symptom is psql
failing with this error on startup:

    symbol lookup error: /usr/lib64/libreadline.so.4: undefined symbol: BC

I'm still trying to find the best way to solve this, but in the mean time
I'm reverting the patch in order to unbreak FC3.
2005-05-07 05:48:50 +00:00
Bruce Momjian f65803a2c3 Done:
> 	o -Allow COPY to optionally include column headings in the first line
2005-05-07 04:38:08 +00:00
Bruce Momjian 5894e7e36e Add items:
> * Prevent to_char() on interval from returning meaningless values
>
>   For example, to_char('1 month', 'mon') is meaningless.  Basically,
>   most date-related parameters to to_char() are meaningless for
>   intervals because interval is not anchored to a date.
>
> * Allow to_char() on interval values to accumulate the highest unit
>   requested
>
> 	o to_char(INTERVAL '1 hour 5 minutes', 'MI') => 65
> 	o to_char(INTERVAL '43 hours 20 minutes', 'MI' ) => 2600
> 	o to_char(INTERVAL '43 hours 20 minutes', 'WK:DD:HR:MI') => 0:1:19:20
> 	o to_char(INTERVAL '3 years 5 months','MM') => 41
>
>   Some special format flag would be required to request such
>   accumulation.  Such functionality could also be added to EXTRACT.
>   Prevent accumulation that crosses the month/day boundary because of
>   the uneven number of days in a month.
>
2005-05-07 04:24:34 +00:00
Bruce Momjian b63990c6a8 Add COPY WITH CVS HEADER to allow a heading line as the first line in
COPY.

Andrew Dunstan
2005-05-07 02:22:49 +00:00
Bruce Momjian ce1ab398dd Update backend flowchart HTML. 2005-05-06 19:13:02 +00:00
Bruce Momjian 33c5fce8db Update flowchart sections to match current CVS. 2005-05-06 19:07:17 +00:00
Bruce Momjian 63ef676781 Markup improvements. 2005-05-06 18:25:46 +00:00
Bruce Momjian 8903592b10 Update backend flowchard wording 2005-05-06 18:23:13 +00:00
Bruce Momjian 6ceebcac3a Adjust question spacing. 2005-05-06 17:48:03 +00:00
Tom Lane 278bd0cc22 For some reason access/tupmacs.h has been #including utils/memutils.h,
which is neither needed by nor related to that header.  Remove the bogus
inclusion and instead include the header in those C files that actually
need it.  Also fix unnecessary inclusions and bad inclusion order in
tsearch2 files.
2005-05-06 17:24:55 +00:00
Tom Lane 4eec2f2407 Update misleading comment about the use of lanpltrusted ... it is
significant regardless of the value of lanispl.
2005-05-06 14:28:53 +00:00
Bruce Momjian acc4f3e3cb Update comment to mention "Name classification hierarchy" as place to
check for reserved words.
2005-05-06 03:42:17 +00:00
Bruce Momjian 051ecca022 Remove documentation that CSV didn't handle carriage returns and line
feeds properly.
2005-05-06 03:38:05 +00:00
Bruce Momjian 902338e06d Convert some mulit-line comments in copy.c to single line, as appropriate. 2005-05-06 02:56:42 +00:00
Tom Lane fba2a104c6 Marginal performance improvements in dynahash: make sure that everything
associated with a hashtable is allocated in that hashtable's private
context, so that hash_destroy only has to destroy the context and not
do any retail pfree's; and tighten the inner loop of hash_seq_search.
2005-05-06 00:19:14 +00:00
Tom Lane 6f1ca7e457 Fix bogus hashtable setup. (This code has quite a few other problems
too, but that one is in my way at the moment.)
2005-05-05 22:18:27 +00:00
Tom Lane c2e729fa20 Make standalone backends ignore pg_database.datallowconn, so that there
is a way to recover from disabling connections to all databases at once.
2005-05-05 19:53:26 +00:00
Bruce Momjian 64c8635a4d On Win32, libintl replaces snprintf() with its own version that
understands arg control, so we don't need our own.  In fact, it
also uses macros that conflict with ours, so we _can't_ use
our own.
2005-05-05 19:15:54 +00:00
Tom Lane 160ca10609 Per core discussion, we should push out a 7.2.* release too while
we are at it.  Add release notes.
2005-05-05 17:59:40 +00:00
Bruce Momjian bd9b2fa84b Add comments on WSAStartup usage. 2005-05-05 16:40:42 +00:00
Bruce Momjian 3731a400b4 Add WSACleanup() for Win32 socket cleanup.
Jason Erickson
2005-05-05 16:36:12 +00:00
Neil Conway d445b413c6 The issue has been raised in the past that our build system links each
executable against the maximal set of libraries it might need. So for
example, if one executable requires `libreadline', all executables are
linked against it.

The easiest fix is to make use of GNU ld's --as-needed flag, which
ignores linker arguments that are not actually needed by the specified
object files. The attached patch modifies configure to check for this
flag (when using GNU ld), and if ld supports it, adds the flag to
LDFLAGS (we need to do the check since only relatively recent versions
of GNU ld support this capability). Currently only GNU ld is supported;
I'm not aware of any other linkers that support this functionality.
2005-05-05 11:50:18 +00:00
Tom Lane db70a31294 Adjust nodeBitmapIndexscan to keep the target index opened from plan
startup to end, rather than re-opening it in each MultiExecBitmapIndexScan
call.  I had foolishly thought that opening/closing wouldn't be much
more expensive than a rescan call, but that was sheer brain fade.

This seems to fix about half of the performance lossage reported by
Sergey Koposov.  I'm still not sure where the other half went.
2005-05-05 03:37:23 +00:00
Bruce Momjian e6e7e64345 Update "control" item.
Rosser Schwarz
2005-05-05 01:42:04 +00:00
Bruce Momjian 45c2171024 Typo fix, Dave Held 2005-05-05 01:23:51 +00:00
Tom Lane d468e19a06 Allow implicit cast from any named composite type to RECORD. At the
moment this has no particular use except to allow table rows to be
passed to record_out(), but that case seems to be useful in itself
per recent example from Elein.  Further down the road we could look
at letting PL functions be declared to accept RECORD parameters.
2005-05-05 00:19:47 +00:00
Tom Lane 13f75e378e Use postmaster_is_alive() check in pg_ctl restart as well as pg_ctl status,
so that restart doesn't fail when old postmaster died unbetimes.
2005-05-04 22:35:15 +00:00
Tom Lane a5ed98ba5a Preliminary release notes for 8.0.3, 7.4.8, 7.3.10. 2005-05-04 21:19:33 +00:00
Tom Lane f593dda030 Spell DELIMITER correctly, per Seamus Dean. 2005-05-04 14:25:24 +00:00
Tom Lane 126eaef651 Clean up MultiXactIdExpand's API by separating out the case where we
are creating a new MultiXactId from two regular XIDs.  The original
coding was unnecessarily complicated and didn't save any code anyway.
2005-05-03 19:42:41 +00:00
Tom Lane 893b57c871 Alter the signature for encoding conversion functions to declare the
output area as INTERNAL not CSTRING.  This is to prevent people from
calling the functions by hand.  This is a permanent solution for the
back branches but I hope it is just a stopgap for HEAD.
2005-05-03 19:17:59 +00:00
Tom Lane 177af51c04 Change tsearch2 to not use the unsafe practice of creating functions
that return INTERNAL without also having INTERNAL arguments.  Since the
functions in question aren't meant to be called by hand anyway, I just
redeclared them to take 'internal' instead of 'text'.  Also add code
to ProcedureCreate() to enforce the restriction, as I should have done
to start with :-(
2005-05-03 16:51:00 +00:00
Neil Conway 39e54e3208 Fix typos in documentation. 2005-05-03 03:10:01 +00:00
Bruce Momjian 47ce51c04a Add FAQ on who controls the project. 2005-05-02 20:11:27 +00:00
Bruce Momjian 3de0e72b56 Completed:
< * Remove unreferenced table files created by transactions that were
> * -Check for unreferenced table files created by transactions that were
2005-05-02 18:27:12 +00:00
Bruce Momjian 76668e6eb4 Check the file system on postmaster startup and report any unreferenced
files in the server log.

Heikki Linnakangas
2005-05-02 18:26:54 +00:00
Neil Conway b656150ec0 Add some missing "See Also" entries to the domain-related SQL reference
pages. From Robert Treat.
2005-05-02 01:52:50 +00:00
Neil Conway f478856c7f Change SPI functions to use a `long' when specifying the number of tuples
to produce when running the executor. This is consistent with the internal
executor APIs (such as ExecutorRun), which also use a long for this purpose.
It also allows FETCH_ALL to be passed -- since FETCH_ALL is defined as
LONG_MAX, this wouldn't have worked on platforms where int and long are of
different sizes. Per report from Tzahi Fadida.
2005-05-02 00:37:07 +00:00
Tom Lane 6c412f0605 Change CREATE TYPE to require datatype output and send functions to have
only one argument.  (Per recent discussion, the option to accept multiple
arguments is pretty useless for user-defined types, and would be a likely
source of security holes if it was used.)  Simplify call sites of
output/send functions to not bother passing more than one argument.
2005-05-01 18:56:19 +00:00
Tom Lane ae793ff63c Fix incorrect backslashing in regexp example, per Robert Treat. 2005-05-01 15:57:59 +00:00
Tom Lane 768eaf1416 Mention the actual stored size of NUMERIC values, per David Fetter. 2005-05-01 15:54:46 +00:00
Neil Conway 628c0893fd Remove the contents of the src/corba subdirectory: this has been dead code
for a long time.
2005-05-01 06:15:51 +00:00
Tom Lane 7f8d2fe31c Change catalog entries for record_out and record_send to show only one
argument, since that's all they are using now.  Adjust type_sanity
regression test so that it will complain if anyone tries to define
multiple-argument output functions in future.
2005-04-30 20:31:39 +00:00
Tom Lane d7018abe06 Make record_out and record_send extract type information from the passed
record object itself, rather than relying on a second OID argument to be
correct.  This patch just changes the function behavior and not the
catalogs, so it's OK to back-patch to 8.0.  Will remove the now-redundant
second argument in pg_proc in a separate patch in HEAD only.
2005-04-30 20:04:33 +00:00
Tom Lane 93b2477278 Use the standard lock manager to establish priority order when there
is contention for a tuple-level lock.  This solves the problem of a
would-be exclusive locker being starved out by an indefinite succession
of share-lockers.  Per recent discussion with Alvaro.
2005-04-30 19:03:33 +00:00
Neil Conway 47458f8c2f GCC 4.0 includes a new warning option, -Wformat-literal, that emits
a warning when a variable is used as a format string for printf()
and similar functions (if the variable is derived from untrusted
data, it could include unexpected formatting sequences). This
emits too many warnings to be enabled by default, but it does
flag a few dubious constructs in the Postgres tree. This patch
fixes up the obvious variants: functions that are passed a variable
format string but no additional arguments.

Most of these are harmless (e.g. the ruleutils stuff), but there
is at least one actual bug here: if you create a trigger named
"%sfoo", pg_dump will read uninitialized memory and fail to dump
the trigger correctly.
2005-04-30 08:08:51 +00:00