Commit Graph

8074 Commits

Author SHA1 Message Date
Bruce Momjian c50aa9db70 Mention SHELL usage in initdb. 2001-05-08 20:38:00 +00:00
Tom Lane 5708a56729 Append and SubqueryScan nodes were not passing changed-parameter signals down
to their children, leading to misbehavior if they had any children that paid
attention to chgParam (most plan node types don't).  Append's bug has been
there a long time, but nobody had noticed because it used to be difficult
to create a query where an Append would be used below the top level of a
plan; so there were never any parameters getting passed down.  SubqueryScan
is new in 7.1 ... and I'd modeled its behavior on Append :-(
2001-05-08 19:47:02 +00:00
Peter Eisentraut c3fa600d8c Need to factor out strdup.o for separate treatment since it's in a
different directory.  This makes dependency tracking work and copes with
compilers that don't suport -c and -o together.
2001-05-08 19:38:57 +00:00
Bruce Momjian 82c9ce2c40 Small cleanup. 2001-05-08 19:00:26 +00:00
Bruce Momjian 857abb0e57 Add newlines around debug output in optimizer showing total costs. 2001-05-08 17:25:28 +00:00
Bruce Momjian 1c551683cb Run pgindent on ODBC code only, to reformat new comments. 2001-05-08 17:12:36 +00:00
Bruce Momjian 296e7ba2ba ODBC source code cleanup patch. Should match rest of PostgreSQL code better. 2001-05-08 17:06:18 +00:00
Bruce Momjian 062a79a990 Allow SHELL in Makefile.* to control initdb. 2001-05-08 16:28:46 +00:00
Bruce Momjian 0b68b89b02 Fix paren typo in java. 2001-05-08 15:29:14 +00:00
Tom Lane eb62f076d0 Un-break exec_move_row() for case that a NULL tuple and tupdesc are
passed, which occurs when no rows are retrieved by a SELECT.
Mea maxima culpa ... I should have caught this.
2001-05-08 01:00:53 +00:00
Bruce Momjian ef06003b06 Fix comment in file about 2*max_connections. 2001-05-07 23:32:55 +00:00
Peter Eisentraut f7bfb5518d Shared library and GCC support for SCO OpenServer. 2001-05-07 20:43:28 +00:00
Peter Eisentraut 465cf168eb Fix remaining RI permission problems (cascaded update/delete, restrict,
set null/default).
2001-05-07 19:57:24 +00:00
Peter Eisentraut 232724af0d Add \cd command to psql. 2001-05-07 19:31:33 +00:00
Bruce Momjian 415263b2d2 > Occasionally and without warning I get this from my daily vacuum
> cronjob:
> NOTICE:  RegisterSharedInvalid: SI buffer overflow
> NOTICE:  InvalidateSharedInvalid: cache state reset
> I don't understand what these mean. Should I be concerned about them
> and what do they signify?

No real need to worry.  Those should've been downgraded to DEBUG-level
messages a release or two back, but nobody bothered...

Tom Lane
2001-05-07 17:20:19 +00:00
Tom Lane f905d65ee3 Rewrite of planner statistics-gathering code. ANALYZE is now available as
a separate statement (though it can still be invoked as part of VACUUM, too).
pg_statistic redesigned to be more flexible about what statistics are
stored.  ANALYZE now collects a list of several of the most common values,
not just one, plus a histogram (not just the min and max values).  Random
sampling is used to make the process reasonably fast even on very large
tables.  The number of values and histogram bins collected is now
user-settable via an ALTER TABLE command.

There is more still to do; the new stats are not being used everywhere
they could be in the planner.  But the remaining changes for this project
should be localized, and the behavior is already better than before.

A not-very-related change is that sorting now makes use of btree comparison
routines if it can find one, rather than invoking '<' twice.
2001-05-07 00:43:27 +00:00
Peter Eisentraut 9583aea9d0 Fix collateral damage from previous (rev 1.49) patch. 2001-05-06 21:15:51 +00:00
Peter Eisentraut 7038554c4e Allow 'psql -f -' to read from standard input. 2001-05-06 17:38:32 +00:00
Peter Eisentraut 84e8e5b427 Make prompt customization work with changeable Unix socket location. 2001-05-06 17:21:11 +00:00
Tom Lane 28ac24e4dd Makefile should have automatic dependency for parser.o too, if it's
going to have any at all.
2001-05-04 22:01:03 +00:00
Tom Lane e2e19ca0cd Seems like we should not hold off cancel/die interrupts while we are
running deferred triggers.  They are really part of the regular
transaction, and they could take awhile.
2001-05-04 18:39:16 +00:00
Tom Lane f5ba72ea04 Consolidate several near-identical uses of mktime() into a single
routine DetermineLocalTimeZone().  In that routine, be more wary of
broken mktime() implementations than the original code was: don't allow
mktime to change the already-set y/m/d/h/m/s information, and don't
use tm_gmtoff if mktime failed.  Possibly this will resolve some of
the complaints we've been hearing from users of Middle Eastern timezones
on RedHat.
2001-05-03 22:53:07 +00:00
Bruce Momjian 0cec2bb0cd BTW it does not add encodign it just patches existing one (KOI8) to
support two - KOI8-R and KOI8-U (latter is superset of the former if
not to take to the account pseudographics)

Andy Rysin
2001-05-03 21:38:45 +00:00
Tom Lane d05b4bd7c6 Permission checking wasn't quite right for insert/update/delete rules,
either :-(.
2001-05-03 21:16:48 +00:00
Bruce Momjian 3f8e21c34a apply a little patch:
Oleg Bartunov
2001-05-03 19:20:24 +00:00
Tom Lane 2792374cff Ensure that btree sort ordering functions and boolean comparison operators
give consistent results for all datatypes.  Types float4, float8, and
numeric were broken for NaN values; abstime, timestamp, and interval
were broken for INVALID values; timetz was just plain broken (some
possible pairs of values were neither < nor = nor >).  Also clean up
text, bpchar, varchar, and bit/varbit to eliminate duplicate code and
thereby reduce the probability of similar inconsistencies arising in
the future.
2001-05-03 19:00:37 +00:00
Tom Lane f2122d092f Permissions were not checked correctly when one view invokes another.
Per bug report from Lieven Van Acker, 5/2/01.
2001-05-03 17:47:49 +00:00
Bruce Momjian 645553eaf6 Improve list. 2001-05-03 17:20:14 +00:00
Bruce Momjian 3bc0ab783b Updates for 7.1.1. Not done yet. 2001-05-03 16:47:58 +00:00
Tom Lane 8571e6c6e5 Correct pg_description entry for type macaddr. 2001-05-03 16:18:02 +00:00
Tom Lane f13cb7e524 Fixes to make ecpg work on Cygwin, from Jason Tishler <Jason.Tishler@dothill.com>. 2001-05-03 16:07:52 +00:00
Tom Lane d67a618e19 Previous commit mistakenly converted all newlines to DOS style (CR/LF).
Convert back to Unix style --- it seems some versions of nmake insist
on this.
2001-05-02 14:23:40 +00:00
D'Arcy J.M. Cain 57faa28740 Add note explaining why inserts take longer as tables grow. Also suggest
the way to handle this.
2001-05-02 11:21:57 +00:00
D'Arcy J.M. Cain 66feaa80dc Change "|zzlzzzz" argument specification to "|zzizzzz" so that the code works
properly on 64 bit systems.

Change submitted by Marc Poinot (Marc.Poinot@onera.fr)
2001-05-02 11:17:24 +00:00
Tom Lane ac2b9aee1c Synced gram.y and preproc.y. 2001-05-01 02:33:55 +00:00
Thomas G. Lockhart d63571a7f4 Allow a string argument to the EXTRACT() function.
This is an extension to the SQL9x standard, but is consistant with usage
 of the underlying date_part() function used to implement it.
 Example: EXTRACT('YEAR',...)
No impact on regression tests.
2001-05-01 01:36:10 +00:00
Hiroshi Inoue 892d46e7d0 1) fix bugs reported by Andrea Aime.
2) fix a bug reported by Jan Wieck.
psqlodbc is 7.01.0005 now.
2001-05-01 00:47:06 +00:00
Tom Lane 8bb3c8fe54 exec_move_row() should be more forgiving of tuples with a different
number of columns than it was expecting, for reasons that are now
documented in the code...
2001-04-30 20:05:40 +00:00
Tom Lane e2004dfc69 Suppress pull-up of subqueries that are in the nullable side of an outer
join.  This is needed to avoid improper evaluation of expressions that
should be nulled out, as in Victor Wagner's bug report of 4/27/01.
Pretty ugly solution, but no time to do anything better for 7.1.1.
2001-04-30 19:24:47 +00:00
Tatsuo Ishii c527366b60 Add missing Unicode support for Cyrillic encodings.
Patches contributed by Victor Wagner.
2001-04-29 07:27:38 +00:00
Tom Lane 2adff4b20e Remove bogus Assert from AbsoluteTimeIsBefore(). (If you don't think
it's bogus, try building a btree index on the regress tests' abstime_tbl.)
2001-04-26 21:52:17 +00:00
Tom Lane a43f20cb0a Tweak nestloop costing to weight restart cost of inner path more heavily.
Without this, it was making some pretty silly decisions about whether an
expensive sub-SELECT should be the inner or outer side of a join...
2001-04-25 22:04:37 +00:00
Philip Warner 8dc42a3aa2 - Fixed CONSTRAINT TRIGGER dump to record tgconstrelid properly
- pgsql v7.0 compatbility
2001-04-25 07:03:20 +00:00
Tom Lane e89bf1258b Undo pgindent brain damage, so that node type numbers can once again be
counted off by lines ...
2001-04-24 00:08:38 +00:00
Tom Lane 5c48b253af Behave sanely when database name is omitted from command line. 2001-04-23 23:36:33 +00:00
Peter Eisentraut fae92fba43 Send 'cd' output to /dev/null. 2001-04-23 20:27:55 +00:00
Tom Lane a933bceacf compatible_oper needs to do ReleaseSysCache in one path to avoid
complaints about 'Cache reference leak'.  Per report from Don Baccus.
2001-04-23 04:32:30 +00:00
Hiroshi Inoue e355992ff9 1) Decrease the size of needlessly large buffers. For example, it
resolved the stack over flow errors reported by Johann Zuschlag.
2) Support {oj syntax for 71. servers.
2001-04-23 01:41:06 +00:00
Hiroshi Inoue cc6bdb3e48 A patch to fix the following bugs.
1) [ODBC] Psqlodbc and Centura: here it is a patch
        posted by Matteo Cavalleli
2) [ODBC] pgsqODBC binding parameters II
        posted by Ludek Finstrle
3) Invalid Page Fault in PSQLODBC.DLL
        personal mail from Johann Zuschlag

   Hiroki Kataoka   kataoka@interwiz.koganei.tokyo.jp
2001-04-23 01:00:49 +00:00
Tom Lane 0e29d760f4 Don't bomb out on indexes on system attributes other than 'oid'.
(Not sure such an index is actually useful, but just because it's
useless doesn't mean pg_dump should coredump.)
2001-04-22 21:34:13 +00:00
Tom Lane 8407bb3c72 Remove useless setuid() call, instead add a check that real and effective
userids are the same.  Per today's pghackers discussion.
2001-04-21 18:29:29 +00:00
Peter Eisentraut 9ae6819038 Make sure that the postmaster options (from postmaster.opts[.default] or
-o option) are properly dequoted.  Also, always pass an explicit -D option
to postmaster, don't rely on it being set in postmaster.opts.
2001-04-21 11:23:58 +00:00
Peter Eisentraut 47324d7689 Add extern int optreset declaration, per bug report from <info@decc.nl>. 2001-04-19 19:09:23 +00:00
Peter Eisentraut 7ff8d11065 Fix "off by VARHDRSZ" bug in (Cyrillic) recode support. 2001-04-19 19:01:23 +00:00
Tom Lane 2dbdba86db Kluge solution for Alex Pilosov's report of problems with whole-tuple
function arguments in join queries: copy the tuples into
TransactionCommandContext so they don't get recycled too soon.  This is
horrid, but not any worse than 7.0 or before, which also leaked such
tuples until end of query.  A proper fix will require allowing tuple
datums to be physically stored inside larger tuple datums, which opens
up a bunch of issues that can't realistically be solved for 7.1.1.
2001-04-19 04:29:02 +00:00
Tatsuo Ishii b9be04e63d Add a crash gurard to pg_encoding_mblen in case of an invalid encoding
given.
2001-04-19 02:34:35 +00:00
Tom Lane 23436bd530 Further tweaking of error messages for cases involving attributes &
functions of join or subselect aliases.  It'd be awfully nice if this
code knew for sure whether it was dealing with 'x.f' or 'f(x)' syntax;
maybe we can fix that in a future cycle.
2001-04-18 22:25:31 +00:00
Peter Eisentraut 645ebc0403 Repair misbehavior of \! with immediately following argument that contains
spaces (e.g., '\!ls -l').  Also correct a comment.
2001-04-18 20:53:08 +00:00
Tom Lane d5096af2c4 Make the world safe for passing whole rows of views to functions. This
already worked fine for whole rows of tables, but not so well for views...
2001-04-18 20:42:56 +00:00
Tom Lane 40136f4465 Make rule lister do the right thing with Vars representing whole tuples. 2001-04-18 17:04:24 +00:00
Hiroshi Inoue 9609a875bb The renewal of README thanks to Dave Page. 2001-04-17 07:30:53 +00:00
Tom Lane c273e8b13c Add some defenses to guard against case where a rule refers to a table
or view that's been dropped and then recreated with the same name (but,
perhaps, different columns).  Eventually we'd like to support this but
for now all we can do is fail cleanly, rather than possibly coredumping
if we proceed using the obsolete rule.
2001-04-17 00:32:58 +00:00
Tom Lane cdcaec5c53 Avoid reversing user-given order of WHERE clauses while attaching clauses
to specific base or join RelOptInfo nodes during planning.  This preserves
the more-intuitive behavior of 7.0.* --- if you write an expensive clause
(such as a sub-select) last, it should get evaluated last.  Someday we
ought to try to have some intelligence about the order of evaluation of
WHERE clauses, but for now we should not override what the user wrote.
2001-04-16 19:44:10 +00:00
Tatsuo Ishii 722f7efdd9 Correction for mathematical properties in Unicode converison maps.
Patches contributed by Eiji Tokuya (e-tokuya@sankyo-unyu.co.jp)
2001-04-16 06:10:19 +00:00
Tom Lane fbee97664e getdatabaseencoding() and PG_encoding_to_char() were being sloppy about
converting char* strings to type 'name'.  Imagine my surprise when 7.1
release coredumped upon start when compiled --enable-multibyte ...
2001-04-16 02:42:01 +00:00
Tom Lane 6ccb2af725 Remove error report from pq_endmessage when pq_putmessage fails. The
only possible failure is in pq_flush, which will log a (better!) report
anyway --- so pq_endmessage is just cluttering the log with a redundant
entry.  This matters when a client crashes partway through a large query,
since we will emit many broken-pipe reports before finishing the query
and exiting.
2001-04-16 01:46:57 +00:00
Tom Lane 382a429d84 Add LDFLAGS_SL to AIX shlib building command, per report from
Rocco Altier <roccoa@routescape.com>.
2001-04-15 03:25:07 +00:00
Tom Lane ffbeafb19a Constant expressions that appear in ORDER BY, GROUP BY, DISTINCT ON
lists should be reverse-compiled into targetlist index numbers, because
that's the only interpretation the parser allows for a constant in these
clauses.  (Ergo, the only way they could have gotten into the list in
the first place is to have come from the targetlist; so this should always
work.)  Per problem report from Peter E.
2001-04-15 03:14:18 +00:00
Tom Lane f9094c44c0 Prevent generation of invalid plans for RIGHT or FULL joins with multiple
join clauses.  The mergejoin executor wants all the join clauses to appear
as merge quals, not as extra joinquals, for these kinds of joins.  But the
planner would consider plans in which partially-sorted input paths were
used, leading to only some of the join clauses becoming merge quals.
This is fine for inner/left joins, not fine for right/full joins.
2001-04-15 00:48:17 +00:00
Peter Eisentraut 15a6cd0091 If the password prompt goes to stderr, then the trailing newline should
also go there.
2001-04-15 00:43:37 +00:00
Peter Eisentraut eb1b164317 Work with Readline 4.2. 2001-04-14 22:55:02 +00:00
Bruce Momjian 25efda227d Add debug_query_string global variable for pgmonitor and debugging use. 2001-04-14 19:11:45 +00:00
Philip Warner 232d8fa3c4 - Get view OID based on rule OID not base table OID
- Fix crash due to null string pointer in some tar files with some libs
2001-04-14 13:11:03 +00:00
Tom Lane 83c94a886c Another try at making numeric MODULO operator produce the right answer.
Although it was now using the right equation, it was making bogus choices
of the precision to compute intermediate results to.  I'm not sure this
is really right even yet, but it's better than before ...
2001-04-14 02:10:57 +00:00
Tom Lane ca224d2ba4 Suppress compiler warnings in Vax and NS32K assembly code: 'register foo'
is not a complete declaration.
2001-04-13 23:32:57 +00:00
D'Arcy J.M. Cain d3d35e9b25 I just noticed the beta comment. That's not actually true any more
so I removed it.
2001-04-12 09:49:37 +00:00
Hiroshi Inoue 7bba7a5c06 Sorry my previous change was a mistake. 2001-04-06 15:31:28 +00:00
Hiroshi Inoue ef4a163afd 1) Fit the precision of floating point to that of server side
(fix by Hiroki kataoka).
2) Ensure the definition of atof()(#include stdlib.h).
  (suggestion by Masaaki Sakaida).
2001-04-06 09:23:44 +00:00
Thomas G. Lockhart 9c3bbf256b Alter the previous test for "time with time zone" implicit time zone
(which failed miserably during DST) to just compare against a time
 derived from a timestamp value.
Certainly not a direct check for a correct result, but should work
 at any time of year.
2001-04-06 05:50:29 +00:00
Tom Lane a3ed622b63 Since plpgsql keeps its compiled function parsetrees until backend exit,
it needs to ensure that data structures attached to fmgr info records in
the trees will stick around that long, too.  Current code was crashing
on cases like datatypes with old-style I/O functions.
2001-04-06 02:06:48 +00:00
Tom Lane f10596c3ec Fix comment that Vadim found confusing. 2001-04-05 16:55:21 +00:00
Vadim B. Mikheev 3092869233 StartupXLOG(): initialize XLogCtl->Insert to new page if there is
no room for a record on last log page.
2001-04-05 09:34:32 +00:00
Michael Meskes 495fe1214c Hopefully fixed the long long problem. 2001-04-05 08:21:14 +00:00
Tom Lane 3ced3cfff9 pg_dump needs to use ONLY when selecting data from user tables, in case
they have children.  As it stood, -d dump mode was badly broken.
2001-04-05 02:50:01 +00:00
Tom Lane 011f1e3169 Clean up AIX makefile to recognize subversions of AIX 4.1 correctly.
This patch is Peter E's, but I'm applying it on his behalf so it'll get
into 7.1RC3 tonight (I'm guessing Peter went to bed already).
2001-04-04 22:57:45 +00:00
Tom Lane 6faf150a30 Fix/cleanup DLLLIBS handling for Cygwin port. If it works it's to
Jason Tishler's credit, if it's broken it's my fault ...
2001-04-04 21:15:56 +00:00
Tom Lane 71d578ab68 Remove daylight-savings-time-dependent tests of 'time with time zone'
datatype.  Perhaps someday we can figure out a way of getting reproducible
results from testing this type, but for now ...
2001-04-04 20:03:11 +00:00
Vadim B. Mikheev 278aa680fc Have to lock buffer while changing page' LSN.
Thanks to Tom.
2001-04-04 15:43:25 +00:00
Philip Warner a51d560d94 Don't dump CHECK constraints with same source and names both
starting with '$'.
2001-04-04 06:47:30 +00:00
Vadim B. Mikheev 1d9819d69e Log sequence creation (to initialize magic number on recovery). 2001-04-03 21:58:00 +00:00
Tom Lane 1c68f27877 Correct bogus mktime() calls. 2001-04-03 18:05:53 +00:00
Philip Warner ab17fd190c - Handle overridden attrs as per discussions 2-Apr-2001
- Dump CHECK constraints in OID order
2001-04-03 08:52:59 +00:00
Tom Lane 08bf4d797b Check for failure of malloc() and realloc() when allocating space for
VFD entries.  On platforms where dereferencing a null pointer doesn't
lead to coredump, it's possible that this omission could have led to
unpleasant behavior like deleting the wrong file.
2001-04-03 04:07:02 +00:00
Tom Lane 6cc6f18d15 open(2) flags saved for re-opening a virtual file should probably not
include O_CREAT.
2001-04-03 02:31:52 +00:00
Tom Lane 503c80d2a0 Restore pre-7.1 behavior of allowing DROP of a table whose underlying
physical file has disappeared.  There is no really good reason why
relcache should be opening the underlying file at all, AFAICS.
In any case we needn't raise a hard error here.
2001-04-02 23:30:04 +00:00
Tom Lane 244fd47124 _mdfd_getrelnfd() should include kernel error code in failure message. 2001-04-02 23:20:24 +00:00
Tom Lane e18f5011aa Complain if the same column name is inherited from multiple parents
with different default values, unless the child table redeclares the
column with an explicit default.  This was judged to be the approach
least likely to cause unpleasant surprises.
2001-04-02 18:30:49 +00:00
Bruce Momjian 97c04fad82 Disable creation of indexes on system tables. 2001-04-02 14:34:25 +00:00
Michael Meskes e6851f056a Synced pgc.l with scan.l. 2001-04-02 08:17:24 +00:00
Tom Lane ba8b844f5a Remove duplicate definition of DLLLIBS, per gripe from Fred Yankowski. 2001-04-02 03:21:23 +00:00
Tom Lane 5967dbd082 Tom Ivar Helbekkmo <tih@kpnQwest.no> says that dynamic linking works
now on VAX NetBSD.  Hence, remove #ifdef'd disable tests.
2001-04-02 03:08:30 +00:00
Tom Lane 2ef99ee708 Planner wasn't correctly handling adjustment of tuple_fraction for the
case of LIMIT in a sub-select.
2001-04-01 22:37:19 +00:00
Philip Warner 135040d511 Patch to put rudimentary dependency support into pg_dump. This addresses
the UDT/function order problem.

    - Rudimentary support for dependencies in archives.
      Uses dependencies to modify the OID used in sorting TOC
      entries. This will NOT handle multi-level dependencies,
      but will manage simple relationships like UDTs & their functions.

    - Treat OIDs with more respect (avoid using ints, use macros
      for conversion & comparison).
2001-04-01 05:42:51 +00:00
Tom Lane 98f7515696 On Cygwin, do initial connect() call in blocking mode, per report from
Jason Tishler.
2001-03-31 23:14:37 +00:00
Tom Lane fc0d3f1447 pqWait() should check for exception status as well as read or write
ready.  It appears that most (all?) Unixen will consider a socket to
be read or write ready if it has an error condition, but of course
Microsoft does things differently.
2001-03-31 23:13:30 +00:00
Tom Lane 648c09181e Re-allow specification of a new default value for an inherited column
in CREATE TABLE, but give a warning notice.  Clean up inconsistent
handling of defaults and NOT NULL flags from multiply-inherited columns.
Per pghackers discussion 28-Mar through 30-Mar.
2001-03-30 20:50:36 +00:00
D'Arcy J.M. Cain 92f3253926 Marc-Andre is changing where DateTime goes. This change allows the module
to work either way.
Change submitted by Andrew Kuchling <akuchlin@mems-exchange.org>
2001-03-30 12:08:24 +00:00
D'Arcy J.M. Cain f9ae973c5e Correct indenting in _quote() function.
Fix submitted by Andrew Kuchling <akuchlin@mems-exchange.org>
2001-03-30 12:04:43 +00:00
Tom Lane dcbbdb1b3e Add appropriately ifdef'd hack to make ARM compiler allocate ItemPointerData
as six bytes not eight.  This fixes a regression test failure but more
importantly avoids wasting four bytes of pad space in every tuple header.
Also add some commentary about what's going on.
2001-03-30 05:25:51 +00:00
Tom Lane d0f6ae68f5 random_seed => seed ... 2001-03-30 04:50:47 +00:00
Bruce Momjian fe0918863b Put proper pgaccess Chinese big5 file in place. 2001-03-29 22:09:06 +00:00
Peter Eisentraut e692b0130b Rename 'random_seed' back to 'seed'. 2001-03-29 19:03:57 +00:00
Michael Meskes 827edf2076 Applied bug fix by Adriaan Joubert <a.joubert@albourne.com> 2001-03-29 09:59:00 +00:00
Tom Lane f155cc82ec Quick hack to fix Oliver Elphick's problem with subselects in an
inheritance query: make duplicate copies of subplans in adjust_inherited_attrs.
When we redesign querytrees we really gotta do something about this
issue of whether querytrees are read-only and can share substructure
or not.
2001-03-27 18:02:19 +00:00
Tom Lane fa0f2c6577 Repair pgindent damage to comments. 2001-03-27 17:12:34 +00:00
Bruce Momjian 341cb70044 The following patch updates the FAQ_AIX and makes C++ code work with
more recent versions of the IBM C++ compiler (now called VisualAge C++).
The C++ part was previously broken (g++ and xlC), thus this is zero risk.
Only AIX specific parts are touched (1 Makefile.shlib line (link with $(COMPILER
) instead
of $(CC) and one shell script line (parameter -C to nm to not demangle C++ symbo
ls for
.exp file)).

I thus ask you to please apply this patch before release.

With or without this patch RC1 on AIX 4.3.2 RS6000 passes "gmake check" for both
 the native
compiler vac.C 5.0.1 and gcc 2.95.2 :-)

Andreas
2001-03-27 14:56:20 +00:00
D'Arcy J.M. Cain c4d354c271 Add changes from Mikhail Terekhov <terekhov@emc.com>.
Use Extension method from distutils.

Cleaned up mismatched indentation styles while I was at it.
2001-03-27 10:53:21 +00:00
Tatsuo Ishii c252c972f6 Add checking for valid database encoding. 2001-03-27 05:47:13 +00:00
Bruce Momjian 12ceb11182 ODBC source code cleanup. Mostly alignment of #define constants. 2001-03-27 04:00:55 +00:00
Tom Lane ff71301806 Spell __volatile__ correctly. 2001-03-27 01:16:24 +00:00
Bruce Momjian 153237cc45 OpenBSD resultmap change:
I posted this to the list a few days ago,  but it was not addressed.  Can
someone please make the changes to the src/test/regress/resultmap?

Thanks.

- brandon
2001-03-26 17:51:41 +00:00
Bruce Momjian 33881e4f68 Add period to message. 2001-03-26 17:00:54 +00:00
Bruce Momjian 099b60b352 Change message to _the_ administrator. There is only one administrative
account.

	This connection has been terminated by the administrator.
2001-03-26 16:59:38 +00:00
Tom Lane 7e733dc960 Add #define HAVE_ATEXIT, per report from Magnus. 2001-03-26 15:21:33 +00:00
Tom Lane b8c2421ef6 pqsignal call needs to be #ifndef WIN32, per report from Magnus. 2001-03-26 15:18:51 +00:00
Hiroshi Inoue 80c6843e6b Add multibyte support 2001-03-26 09:34:17 +00:00
Tom Lane ccd415c63f Fix unportable assumptions about alignment of local char[n] variables. 2001-03-25 23:23:59 +00:00
Tom Lane 571dbe4606 Improve comments for xlog item size #defines. 2001-03-25 22:40:58 +00:00
D'Arcy J.M. Cain 5fb00d424a Update the changes for version 3.2. 2001-03-25 22:23:44 +00:00
D'Arcy J.M. Cain f99e2003f1 Document the --with-python flag as a simpler way of installing the
PyGreSQL module when installing PostgreSQL.

Document the location of the WIN32 binaries.
2001-03-25 22:22:51 +00:00
Peter Eisentraut 3206e5225f Pick up any extra -I options for Python build. 2001-03-25 19:44:04 +00:00
Tom Lane 1ed61b3a9c Fix unportable assumptions about alignment of local char[n] variables. 2001-03-25 19:30:28 +00:00
Tom Lane 42eaad0575 Re-order declarations to un-break the non-HAS_TEST_AND_SET case. 2001-03-25 17:52:46 +00:00
Tom Lane 00713cb7cb Fix code that incorrectly assumed a 'char foo[N]' local variable would
be aligned on a word boundary.  Per report from Steve Nicolai.
2001-03-25 00:45:20 +00:00
Peter Eisentraut 6ba0f31bdd Make less misleading message for failed + ignored tests. 2001-03-24 23:32:25 +00:00
Tom Lane f2c8f278b1 Portability fix from Steve Nicolai. 2001-03-24 23:11:14 +00:00
Peter Eisentraut b420c47434 Disable pg_upgrade. 2001-03-24 13:21:14 +00:00
Tom Lane 5b4045d5d6 Hadn't built on a PARISC 1.1 box in a long time ... but when I did,
it turned out that the libpq makefile chokes on '-L /lib/pa1.1'.
Need to remove the space so filter rule works.
2001-03-24 06:17:41 +00:00
Tom Lane e458ebfd21 When using 'long long int' for int64 type, check to see if the compiler
accepts nnnLL syntax for long long constants.  If so, decorate the CRC64
constants with LL to avoid warnings and/or erroneous results from certain
non-standards-compliant compilers.
2001-03-23 18:42:12 +00:00
Tom Lane 32924c1c90 Mark exception and assert global variables as DLLIMPORT, so that plpgsql
can be compiled with asserts enabled on Windoze.
2001-03-23 18:26:01 +00:00
Tatsuo Ishii 40f158da48 Add checking for strtoul. SunOS4 does not have it. 2001-03-23 05:46:05 +00:00
Bruce Momjian 7cf952e7b4 Fix comments that were mis-wrapped, for Tom Lane. 2001-03-23 04:49:58 +00:00
Philip Warner b1065f8fc2 Fix checking of file operations in demo ('files') output format. 2001-03-23 01:27:12 +00:00
Tom Lane a062473696 Fix problems with coredumps due to ^C when longjmp buffer isn't valid.
Now, we will only catch ^C at times when it is valid.
2001-03-23 00:36:38 +00:00
Tom Lane b32cac8055 Fix Joubert's complaint that int8-sized numeric literals are mishandled
on Alpha (because parser mistakenly assumes that a nonoverflow result
from strtol means the value will fit into int4).  A scan for other uses
of strtol and strtoul found a couple other places with the same mistake;
fix them too.  The changes are all conditional on HAVE_LONG_INT_64 to
avoid complaints from compilers that think x != x is a silly test
(cf. pg_atoi).
2001-03-22 17:41:47 +00:00
Marc G. Fournier 69a2c2bad2 geometry tests 'FAILED' from a precision standpoint, but differently then
what solaris-precision takes into account ... its possible that solaris-precision
is 'stale', but created a new one "just in case" ...
2001-03-22 15:13:19 +00:00
Bruce Momjian 0686d49da0 Remove dashes in comments that don't need them, rewrap with pgindent. 2001-03-22 06:16:21 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Hiroshi Inoue ff3c4896a9 The attached patch fixes win32.mak which got broken by the Multibyte mod
:-(, and tidies it up a little as well.

Regards, Dave.
2001-03-21 16:26:17 +00:00
Vadim B. Mikheev ab36582a19 Check bufHdr->cntxDirty and call StartBufferIO in BufferSync()
*before* acquiring shlock on buffer context. This way we should be
protected against conflicts with FlushRelationBuffers.
(Seems we never do excl lock and then StartBufferIO for the same
buffer, so there should be no deadlock here, - but we'd better
check this very soon).
2001-03-21 10:13:29 +00:00
Hiroshi Inoue 736c4655c3 a fix from Eiji Tokuya. 2001-03-21 09:35:25 +00:00
Bruce Momjian 85c0c73267 Fix 'ps' WAIT status display bug on setproctitle() platforms, cleared by
Tom Lane.
2001-03-20 22:31:54 +00:00
Tom Lane ca03b551fc Discuss LOCALE differences as a reason for regression test failure. 2001-03-20 00:09:36 +00:00
Tom Lane 68bc848766 Tweak out-of-memory error messages to include the request size, so that
it's easier to tell whether a bug report is talking about progressive
memory exhaustion or a wacko requested chunk size.
2001-03-19 22:29:39 +00:00
Tom Lane 184fb14b90 Make regular-expression error messages a tad less obscure,
per gripe from Josh Berkus.
2001-03-19 22:27:46 +00:00
Bruce Momjian c41536ea56 Update Peter Mount's email address in README. 2001-03-19 21:57:09 +00:00
Philip Warner cfeccdf80a - Added CVS headers to files
- Avoid forcing table name to lower case in FixupBlobXrefs
 - Removed fmtId calls for all ArchiveEntry name fields. This fixes
   quoting problems in trigger enable/disable code for mixed case
   table names, and avoids commands like 'pg_restore -t '"TblA"'
2001-03-19 02:35:29 +00:00
Tom Lane 7c9f29546c Give postmaster enough time to update the pidfile before checking to
see if it's been updated.  Skip the whole mess if we didn't see any
old pidfile.
2001-03-18 20:27:11 +00:00
Tom Lane af6e88a9cf Remove NEXTXID xlog record type to avoid three-way deadlock risk.
NEXTXID isn't really necessary, per previous discussion in pghackers,
but I mulishy insisted we should put it in anyway.  Mea culpa.
2001-03-18 20:18:59 +00:00
Tom Lane ddc5bc958a When we add 'waiting' to the ps_status display, there should be a
space in front of it.  Improve comments a little.
2001-03-18 20:13:13 +00:00
Tom Lane 934126b518 Considering the BeOS port didn't compile without IPC_STAT and shm_nattch,
I'm betting the QNX4 port does not either ...
2001-03-18 18:32:02 +00:00
Tom Lane 4bd983bf34 Patches from Cyril Velter to make shared-memory-conflict-detection code
work in BeOS port.
2001-03-18 18:22:08 +00:00
Philip Warner 5c1b00450c Fixed but in _enableTriggersIfNecessary introduced by previous patches by me
which caused segfault in a data-only retore with BLOBs
2001-03-18 03:45:12 +00:00
Tom Lane fd5bac6d27 Fix coredump due to writing one more byte than we'd allocated. 2001-03-18 02:25:32 +00:00
Tom Lane ae293d33cf Make sure ControlFile logId/logSeg don't go backwards (barely possible given a
slow backend, if we update unconditionally as the code did before).
2001-03-18 00:30:27 +00:00
Tom Lane 5a38af7fd8 Rearrange XLogFileInit so that control-file spinlock is not held while filling
the new log file with zeroes, only while renaming it into place.  This should
prevent problems with 'stuck spinlock' errors under heavy load.
2001-03-17 20:54:13 +00:00
Michael Meskes 90c1e2cc43 Fixed bug in handling of pointers to structs. 2001-03-16 13:05:57 +00:00
Hiroshi Inoue 935017457b Oops I forgot to add new files for multibyte support.
Sorry Eiji.
2001-03-16 13:03:04 +00:00
Tom Lane 9d645fd84c Support syncing WAL log to disk using either fsync(), fdatasync(),
O_SYNC, or O_DSYNC (as available on a given platform).  Add GUC parameter
to control sync method.
Also, add defense to XLogWrite to prevent it from going nuts if passed
a target write position that's past the end of the buffers so far filled
by XLogInsert.
2001-03-16 05:44:33 +00:00
Hiroshi Inoue 9242e6c038 Add multibyte support.
Provide an extenisible scheme of encoding conversion.
	As the first step, SJIS and BIG5 are supported.
	From now on multibyte people would be happy to use
	this psqlodbc driver.

Eiji Tokuya e-tokuya@mail.sankyo-unyu.co.jp
2001-03-16 01:17:23 +00:00
D'Arcy J.M. Cain 551e0aa991 Fix parameter handling.
Fix a bug where cs.execute('select %d + %d', (1, 2)) would get interpreted
as cs.executemany('select %d + %d', (1, 2))
2001-03-15 11:56:05 +00:00
D'Arcy J.M. Cain 37d67eb159 Add WIN32 support. 2001-03-15 11:26:22 +00:00
Tom Lane 7f02049137 Give a more reasonable error message for a bad attribute name applied
to a join or subselect alias ... cf. Oliver Elphick's complaint 13-Mar.
2001-03-14 23:55:33 +00:00
Tom Lane 7fdaf78ed0 Reduce amount of memory used per tuple for after-event triggers. This
is still a memory leak, but a little less bad than it was.
2001-03-14 21:50:32 +00:00
Tom Lane c9f26d7af6 COPY should handle after-insert triggers the same as execMain.c does.
I'm not sure that it's really necessary to save insert events when there
are only after update or delete triggers, but certainly it's wrong for
COPY to behave differently from an INSERT query.
2001-03-14 21:47:50 +00:00
Peter Eisentraut 609fee4717 A much better version of this is now in backend/port/aix. 2001-03-14 21:16:57 +00:00
Peter Eisentraut 8ec7986080 It's "gmake dist" now. 2001-03-14 21:11:53 +00:00
Peter Eisentraut b651540720 For some ungodly reason my etags doesn't have an --output option, but it
does have -o.
2001-03-14 21:07:16 +00:00
Peter Eisentraut e6a4413481 We're past Postgres95 now, and I'm sure Jolly doesn't want to receive any
bug reports.  ;-)
2001-03-14 21:03:38 +00:00
Peter Eisentraut a298589e1c We got automatic dependencies now. 2001-03-14 20:53:13 +00:00
Peter Eisentraut fbc69e29af We're way past 6.3 ... 2001-03-14 20:47:24 +00:00
Peter Eisentraut c785e1e3b0 Update. Things are now build through 'make'. 2001-03-14 20:44:40 +00:00
Tom Lane cfab4f6541 Use SEP_CHAR consistently in forming XLOG pathnames. 2001-03-14 20:23:04 +00:00
Tom Lane 7ebbf20763 Remove obsolete PowerPC-specific hack for comparisons to DBL_MIN
(per recent discussion with Tatsuo).  Hopefully the compilers with
that old bug are all long gone.
2001-03-14 20:12:10 +00:00
Tom Lane c6c1fea06d Move -Bsymbolic for HPUX to Makefile.hpux, per Peter E's recommendation. 2001-03-14 19:35:12 +00:00
Bruce Momjian 9de4b77cee 'waiting' status display had extra space, removed.
Change the administrator to 'an' administrator.
2001-03-14 18:24:34 +00:00
Tom Lane 5dd04603b9 Don't go belly-up if fork() fails for a routine checkpoint subprocess.
Just try again later.
2001-03-14 17:58:46 +00:00
Tom Lane 286d1fc382 Fix numeric modulo operator for case of fractional right argument. 2001-03-14 16:50:37 +00:00
Bruce Momjian 2e7835f7f8 New shutdown wording:
This connection has been terminated by the administrator
2001-03-14 15:14:35 +00:00
Hiroshi Inoue 08bf4d68de Fix some memory leaks. 2001-03-14 09:10:04 +00:00
Hiroshi Inoue ebffbb42ac ifdef out reindex stuff in VACUUM for safety. 2001-03-14 08:40:57 +00:00
Peter Eisentraut f192da1ba3 Provide more useful error message if 'postgres -V' failed. Advertise
pg_ctl '-l' option.
2001-03-13 21:37:15 +00:00
Tom Lane 1b87e24c4a Change xlog page-header format to include StartUpID. Use the SUI to
detect case that next page in log came from an older run than the prior
page.  This avoids the necessity to re-zero the log after recovery from
a crash, which is good because we need not risk destroying valuable log
information.
This forces another initdb since yesterday :-(.  Need to get that log
reset utility done...
2001-03-13 20:32:37 +00:00
Philip Warner ccca223b5c - Use subselect when enabling triggers,
- Use exact table names when enabling/disabling triggers
2001-03-13 13:18:44 +00:00
Hiroshi Inoue e376cb6078 The attached file contains the registry settings required to install the
ODBC driver on Windows 9X/ME/NT/2K when using the later versions of the
driver that don't have the Installshield installation:

1) Install psqlodbc.dll in to C:\Windows\System or C:\Winnt\System32
2) Add the registry settings in the attached file using regedit.

A useful addition to src/interfaces/odbc perhaps?

Regards, Dave.
2001-03-13 09:03:24 +00:00
Tom Lane 4d14fe0048 XLOG (and related) changes:
* Store two past checkpoint locations, not just one, in pg_control.
  On startup, we fall back to the older checkpoint if the newer one
  is unreadable.  Also, a physical copy of the newest checkpoint record
  is kept in pg_control for possible use in disaster recovery (ie,
  complete loss of pg_xlog).  Also add a version number for pg_control
  itself.  Remove archdir from pg_control; it ought to be a GUC
  parameter, not a special case (not that it's implemented yet anyway).

* Suppress successive checkpoint records when nothing has been entered
  in the WAL log since the last one.  This is not so much to avoid I/O
  as to make it actually useful to keep track of the last two
  checkpoints.  If the things are right next to each other then there's
  not a lot of redundancy gained...

* Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs
  on alternate bytes.  Polynomial borrowed from ECMA DLT1 standard.

* Fix XLOG record length handling so that it will work at BLCKSZ = 32k.

* Change XID allocation to work more like OID allocation.  (This is of
  dubious necessity, but I think it's a good idea anyway.)

* Fix a number of minor bugs, such as off-by-one logic for XLOG file
  wraparound at the 4 gig mark.

* Add documentation and clean up some coding infelicities; move file
  format declarations out to include files where planned contrib
  utilities can get at them.

* Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or
  every CHECKPOINT_TIMEOUT seconds, whichever comes first.  It is also
  possible to force a checkpoint by sending SIGUSR1 to the postmaster
  (undocumented feature...)

* Defend against kill -9 postmaster by storing shmem block's key and ID
  in postmaster.pid lockfile, and checking at startup to ensure that no
  processes are still connected to old shmem block (if it still exists).

* Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency
  stop, for symmetry with postmaster and xlog utilities.  Clean up signal
  handling in bootstrap.c so that xlog utilities launched by postmaster
  will react to signals better.

* Standalone bootstrap now grabs lockfile in target directory, as added
  insurance against running it in parallel with live postmaster.
2001-03-13 01:17:06 +00:00
Tom Lane b246510ccc Avoid O(N^2) behavior in deferredTriggerAddEvent() for large numbers of
tuples inserted/deleted/updated in a single transaction.  On my machine,
this reduced the time to delete 80000 tuples in a foreign-key-referencing
table from ~15min to ~8sec.
2001-03-12 23:02:00 +00:00
Peter Eisentraut 671be61916 Add uninstall target to Java build.
Respect default port setting in JDBC driver.
Pick up version number from Makefile.global.
Change installation directory to share/java/.
Document.
2001-03-11 11:07:01 +00:00
Tom Lane 9c2c9fcdfb Turns out the HPUX linker likes -Bsymbolic too. Without this, ODBC
driver does not work because its internal cross-references get bound
to similarly named functions in unixODBC shared library.
2001-03-10 23:15:20 +00:00
Tom Lane 5ab642fdf1 Provide a hack to let initialization happen on platforms for which
psqlodbc.c's constructor-making techniques do not work.
2001-03-10 23:12:28 +00:00
Tom Lane eb9033ce95 Do not accept values from sections following the specified section. 2001-03-10 22:30:57 +00:00
Peter Eisentraut a3176dac22 Use install-sh unconditionally. 2001-03-10 10:38:59 +00:00
Tom Lane 2cfc8fcb5d FATAL errors should cause exit with nonzero status if we are not running
under the postmaster --- specifically, if we are a standalone backend
running under the initdb script, this is critical!
2001-03-10 04:21:51 +00:00
Hiroshi Inoue e666422ebf 1)Allow the access to indexes with up to 16 keys.
2)Fix some memory leaks.
3)Change some bogus error messages.
2001-03-10 03:34:57 +00:00
Tom Lane 5490195f04 Don't choke on superuser names containing random punctuation. 2001-03-09 22:10:13 +00:00
Peter Eisentraut edebfec803 Recursive distclean shouldn't depend on recursive clean. Subdirectories
handle this.
2001-03-09 21:50:27 +00:00
Hiroshi Inoue 8fff96f1cb hold interupts during LockWaitCancel(). 2001-03-09 06:36:32 +00:00
Tom Lane d73e9df087 A subplan invoked within an aggregate function's argument should
be allowed to receive ungrouped variables of the current query level.
Curious that no one reported this bug before...
2001-03-08 01:49:01 +00:00
Tom Lane 572fda2711 Modify wchar conversion routines to not fetch the next byte past the end
of a counted input string.  Marinos Yannikos' recent crash report turns
out to be due to applying pg_ascii2wchar_with_len to a TEXT object that
is smack up against the end of memory.  This is the second just-barely-
reproducible bug report I have seen that traces to some bit of code
fetching one more byte than it is allowed to.  Let's be more careful
out there, boys and girls.
While at it, I changed the code to not risk a similar crash when there
is a truncated multibyte character at the end of an input string.  The
output in this case might not be the most reasonable output possible;
if anyone wants to improve it further, step right up...
2001-03-08 00:24:34 +00:00
Tom Lane b109b03fea Repair a number of places that didn't bother to check whether PageAddItem
succeeds or not.  Revise rtree page split algorithm to take care about
making a feasible split --- ie, will the incoming tuple actually fit?
Failure to make a feasible split, combined with failure to notice the
failure, account for Jim Stone's recent bug report.  I suspect that
hash and gist indices may have the same type of bug, but at least now
we'll get error messages rather than silent failures if so.  Also clean
up rtree code to use Datum rather than char* where appropriate.
2001-03-07 21:20:26 +00:00
Bruce Momjian 296c806dd5 > Applied. Thanks.
One more :)) It's for improper function argumets for
PLTCL_UNKNOWN_SUPPORT code

I'm not an autoconf expert, but is it possible to enable unknown
support in pltcl with configure option ?
This support is really handy for real life usage of pl/tcl.

seva@sevasoft.kiev.ua
2001-03-07 16:18:08 +00:00
Bruce Momjian 3dc1b2b71d pltcl_loadmod has problems with big (>4k) modules because of missing incr
in splitting code:

seva@sevasoft.kiev.ua
2001-03-07 16:09:09 +00:00
Tom Lane 5e00557fa2 Believe $POSTGRES_LIB and $POSTGRES_INCLUDE only if they name actual
directories, per suggestion from Robert Creager.
2001-03-06 22:07:09 +00:00
Peter Eisentraut d5e2e7dcf8 Help message s/dump/restore/ (must have been copy&pasted from pg_dump). 2001-03-06 19:58:27 +00:00
Peter Mount b562c62b5d Tue Mar 06 12:05:00 GMT 2001 peter@retep.org.uk
- Removed org.postgresql.xa.Test from the JDBC EE driver as it's an old
          test class and prevented it from compiling.
2001-03-06 12:04:46 +00:00
Philip Warner ce495f8d77 - Dump relevant parts of sequences only when doing schemaOnly & dataOnly
- Prevent double-dumping of sequences when dataOnly.
2001-03-06 04:53:28 +00:00
Philip Warner aa28eebf4c - Only disable triggers in DataOnly (or implied data-only) restores.
- Change -U option to -L to allow -U to specify username in future. (pg_restore)
2001-03-06 04:08:04 +00:00
Bruce Momjian 83d0e37947 Update email addresses. 2001-03-05 18:09:55 +00:00
Bruce Momjian ec30cfd799 Here is the chinese_big5 patch for PgAccess. I've tested under Chinese
Windows 2000 without any problem.

Have fun.

LM.Liu
2001-03-05 17:20:37 +00:00
Peter Mount c18bb990d3 Ok, I've split todays commit into three, the first two already done had some
bits in JDBC & the first set of tools into contrib.

This is the third, and deals with enabling JDBC to be compiled with the main
source.

What it does is add a new option to configure: --with-java

This option tells configure to look for ant (our build tool of choice) and
if found, it then compiles both the JDBC driver and the new tools as part
of the normal make.

Also, when the postgresql install is done, all the .jar files are also
installed into the ${PGLIB}/java directory (thought best to keep then separate)

Now I had some conflicts when this applied so could someone please double check
that everything is ok?

Peter
2001-03-05 09:40:02 +00:00
Peter Mount 9142ca2faf Minor fixes... 2001-03-05 09:17:43 +00:00
Bruce Momjian 60cea7d71a Update mysql converter, new version released. 2001-03-04 15:43:33 +00:00
Peter Eisentraut 23e41fb7fb Add configure check for -lunix, for QNX.
Recode test for equality of source and build directory using 'test -ef',
because even using pwd you might not get equal strings.  Thanks, QNX.
2001-03-03 15:53:41 +00:00
D'Arcy J.M. Cain 7a2fdd9632 Update the version number. We may change this to 7.1 if we align it with
PostgreSQL.

Add notice that development has moved into the PostgreSQL tree.
2001-03-03 14:00:56 +00:00
D'Arcy J.M. Cain 88342ae929 Add oid to list of keys cached.
Add a test to avoid an exception in certain cases.
2001-03-03 13:58:24 +00:00
D'Arcy J.M. Cain 6b6f8327ae Incrementing version number in preparation for next release. Note that I
am talking with Thomas Lockhart about the idea of bringing the PyGreSQL
version number into alignment with PostgreSQL so this may change to 7.1
before the release.

I have added to the copyright to indicate that from now on the PostgreSQL
copyright will apply.  If someone wants to make that clearer please do.
The existing copyrights need to stay there for now but if necessary I can
ask Pascal Andre if he agrees to a different wording.

Added reference to the Python DB-API 2.0 compliant API wrapper.

Added reference to the PyGreSQL mailing list.
2001-03-03 13:54:35 +00:00
D'Arcy J.M. Cain a487e0d333 Added postgres.h header for more type checking.
Changed the way that OID is retrieved on inserts.  PQoidStatus appears
to be deprecated so I am using PQoidValue instead.
2001-03-03 13:42:37 +00:00
Peter Eisentraut f1ad18d49a Add missing include. 2001-03-01 19:03:44 +00:00
Peter Eisentraut 653cd3e38e Fix memory leak. 2001-03-01 18:52:50 +00:00
Tom Lane ea7b4f1f04 Ensure previous setting of pset.queryFout is restored after a failed
backslash-g command.
2001-03-01 18:34:29 +00:00
Peter Eisentraut 08372d4e03 Add missing semicolon required by QNX shell.
from "Tegge, Bernd" <tegge@repas-aeg.de>
2001-03-01 16:17:53 +00:00
Tatsuo Ishii fa2e3cffd3 Remove HAVE_OPTARG per discussion in hackers list. 2001-03-01 05:05:29 +00:00
Peter Eisentraut bd6f02e7e6 Do not strip whitespace within quotes. 2001-02-28 20:39:42 +00:00
Tom Lane 778a21ca94 Tweak portal (cursor) code so that it will not call the executor again
when user does another FETCH after reaching end of data, or another
FETCH backwards after reaching start.  This is needed because some plan
nodes are not very robust about being called again after they've already
returned NULL; for example, MergeJoin will crash in some states but not
others.  While the ideal approach would be for them all to handle this
correctly, it seems foolish to assume that no such bugs would creep in
again once cleaned up.  Therefore, the most robust answer is to prevent
the situation from arising at all.
2001-02-27 22:07:34 +00:00
Tom Lane f5ea88ac6e Mark new text<->date, text<->time, text<->timetz conversion functions as
noncachable, so that CURRENT_DATE and CURRENT_TIME work as functions
again, rather than being collapsed to constants immediately.  Marking the
reverse conversions noncachable might be overkill, but I'm not sure;
do these datatypes have the notion of a CURRENT value?  Better safe than
sorry, for now.
2001-02-27 20:34:10 +00:00
Tatsuo Ishii df247b821d Massive commits for SunOS4 port. 2001-02-27 08:13:31 +00:00
Tatsuo Ishii 919ace07d5 Fix vacuum analyze error.
vacuum analyze on pg_type fails if bogus entries remain in pg_operator.
Here is a sample script to reproduce the problem.

drop table t1;
create table t1(i int);
drop function foo(t1,t1);
create function foo(t1,t1) returns bool as 'select true' language 'sql';
create operator = (
	leftarg = t1,
	rightarg = t1,
	commutator = =,
	procedure = foo
	);
drop table t1;
vacuum analyze;
2001-02-27 07:07:00 +00:00
Michael Meskes 06e3d84d88 Fixed variable handling in preproc.y. 2001-02-26 14:42:54 +00:00
Tatsuo Ishii f6f8c332b1 Allow pgaccess to input Japanese. See included mail.
Subject: [HACKERS] pgaccess Japanese input capability patch
From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: teo@flex.ro
Cc: pgsql-hackers@postgresql.org, pgsql-interfaces@postgresql.org
Date: Sat, 24 Feb 2001 21:41:14 +0900

Hi Teodorescu,

I have made patches which enable pgaccess to input Japanese characters
in the table editing window. As you might know, to input Japanese
characters, we first type in "hiragana" then convert it to "kanji". To
make this proccess transparent to tcl application programs, libraries
are provided with localized version of Tcl/Tk. The patches bind
certain keys to initiate a function (kanjiInput) that is responsible
for the conversion process. If the function is not available, those
keys will not be binded.

Comments?
--
Tatsuo Ishii
2001-02-26 05:15:48 +00:00
Tom Lane 9c9936587c Implement COMMIT_SIBLINGS parameter to allow pre-commit delay to occur
only if at least N other backends currently have open transactions.  This
is not a great deal of intelligence about whether a delay might be
profitable ... but it beats no intelligence at all.  Note that the default
COMMIT_DELAY is still zero --- this new code does nothing unless that
setting is changed.
Also, mark ENABLEFSYNC as a system-wide setting.  It's no longer safe to
allow that to be set per-backend, since we may be relying on some other
backend's fsync to have synced the WAL log.
2001-02-26 00:50:08 +00:00
Tom Lane 496ea7a876 At least on HPUX, select with delay.tv_sec = 0 and delay.tv_usec = 1000000
does not lead to a one-second delay, but to an immediate EINVAL failure.
This causes CHECKPOINT to crash with s_lock_stuck much too quickly :-(.
Fix by breaking down the requested wait div/mod 1e6.
2001-02-24 22:42:45 +00:00
Tom Lane f1e0044ba3 When under postmaster, bogus arguments should cause proc_exit(0) not
proc_exit(1).  Unless you think a system-wide restart is an appropriate
response to bogus PGOPTIONS, that is.
2001-02-24 02:04:51 +00:00
Tom Lane 2b0f8ae009 Fix pg_dump crashes caused by bogus use of va_start/va_end (only seen
on some platforms, which is not too surprising considering how platform
specific these macros must be).
2001-02-23 22:52:32 +00:00
Tom Lane e74ce0a566 As long as we're fixing this space calculation, let's actually do it
right.  We should MAXALIGN the individual items because we'll
allocate them individually, not as an array.
2001-02-23 20:12:37 +00:00
Bruce Momjian a37666c2ec Update comments on locks. 2001-02-23 19:24:06 +00:00
Bruce Momjian 81b48493aa Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Is there one LOCKMETHODCTL for every backend?  I thought there was only
> one of them.
>>
>> You're right, that line is erroneous; it should read
>>
>> size += MAX_LOCK_METHODS * MAXALIGN(sizeof(LOCKMETHODCTL));
>>
>> Not a significant error but it should be changed for clarity ...
2001-02-23 18:28:46 +00:00
Hiroshi Inoue 94b61fbc58 Resolve a compile error. 2001-02-23 09:31:52 +00:00
Hiroshi Inoue 34822e517a Reindex of shared system indexes must be overwrite mode. 2001-02-23 09:26:14 +00:00
Tatsuo Ishii 5735c4cf3d Enhanced UTF-8/SJIS mapping generator, contributed by
Eiji Tokuya" <e-tokuya@Mail.Sankyo-Unyu.co.jp>
2001-02-23 08:44:33 +00:00
Bruce Momjian 28f82ebe9e chinese-gb -> chinese_gb. 2001-02-23 01:21:58 +00:00
Bruce Momjian 5df25b357e Rename to chinese-gb 2001-02-23 01:21:27 +00:00
Bruce Momjian a95ac415f7 More comment cleanups. 2001-02-22 23:20:06 +00:00
Bruce Momjian 82fc51e0b3 More comment improvements. 2001-02-22 23:02:33 +00:00
Bruce Momjian 4f6c49fef0 Clean up index/btree comments/macros, as approved. 2001-02-22 21:48:49 +00:00
Bruce Momjian 660ca3e01c Change /*---- commants to /* where appropriate. pgindent will tighten
up the comments later.
2001-02-22 18:39:20 +00:00
Bruce Momjian a69f81c202 Update flowchart xfig file. 2001-02-22 18:09:20 +00:00
Bruce Momjian d19eeb1b1f The attachement is the Chinese (GB) patch for PgAccess, don't know
if it's correct to post here.
It's simple to do the translation, And I've test in 7.0.2 & current CVS,
seems pretty good.
If anyone want this little thing, I'll very happy.
use it is very simple, just gunzip it and copy to
$PGDIR/share/pgaccess/lib/languages/ for current CVS version,
and $PGDIR/pgaccess/lib/languages/ for 7.0*
BTW: I havn't got the tools to translate it to BIG5 encoding, is there
anybody to to it?

He Weiping(Laser Henry)
2001-02-22 15:33:14 +00:00
Hiroshi Inoue 50e3c60b95 Avoid 'FATAL: out of free buffers: time to abort !" error
during WAL recovery.  Recovery failure is always serious.
2001-02-22 08:59:40 +00:00
Tom Lane b200d0993d Adjust expected error message due to change of keyword case-folding. 2001-02-22 05:32:56 +00:00
Tatsuo Ishii a0fa71837a Add _REGEX_UTILS_H to avoid duplication. 2001-02-22 04:35:00 +00:00
Hiroshi Inoue 3df0fce801 Fix the bug report [ODBC] select from a table having more than 32 fields:
reported by Matteo Cavalleri.
Great thanks to Tom for his accurate analysis.
2001-02-22 03:39:30 +00:00
Tom Lane 4dba6814a3 Correct bogus output formatting of timeofday() function. A number of
microseconds < 100000 should be displayed as, eg, 13.000126, not 13.126.
2001-02-21 22:03:00 +00:00
Bruce Momjian 15903a1ed4 Comment improvements. 2001-02-21 19:07:04 +00:00
Tom Lane be92ad49e0 Change case-folding of keywords to conform to SQL99 and fix misbehavior
in Turkish locale.  Keywords are now checked under pure ASCII case-folding
rules ('A'-'Z'->'a'-'z' and nothing else).  However, once a word is
determined not to be a keyword, it will be case-folded under the current
locale, same as before.  See pghackers discussion 20-Feb-01.
2001-02-21 18:53:47 +00:00
Tatsuo Ishii fa877ed8ee Safe guard in case of imporper data is provided to elog()
in multi-byte build.
2001-02-21 06:05:23 +00:00
Tatsuo Ishii 62e48272c2 new regression data for 7.1 2001-02-21 06:03:25 +00:00
Tatsuo Ishii ad7424e391 change destroydb -> dropdb 2001-02-21 06:02:04 +00:00
Tom Lane 5ba0f855d1 Clean out any old versions of no-longer-installed header files that may
be lurking in the install target directory.  But don't zap up-to-date
headers (so install-all-headers before regular install will work).
Per suggestion from Larry Rosenman.
2001-02-20 20:37:13 +00:00
Tom Lane 17137d6c5b Remove unportable #warning directive. 2001-02-20 19:39:24 +00:00
Peter Eisentraut cb6edf9d56 Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
2001-02-20 19:20:30 +00:00
Tom Lane d1864e388a Select optimization by default for HP's C compiler. 2001-02-20 19:04:04 +00:00
Tom Lane d18c1d1f51 Truncate incoming username and database name to NAMEDATALEN-1 characters
so that we don't reject overlength names unnecessarily.
2001-02-20 01:34:40 +00:00
Tom Lane f35252de28 Fix pg_passwd's failure to cope with usernames > 8 chars. 2001-02-20 01:16:49 +00:00
Tom Lane a24b04de88 Remove inclusion of <varargs.h> on SunOS; this does not work since we
use the ANSI varargs style (<stdarg.h>) not the old style.  Tatsuo had
reported this change was necessary back in the 7.0 beta cycle (4/13/00)
but for some reason, making the edit never got done.
2001-02-20 00:28:07 +00:00
Tom Lane 414f94f262 Change plpgsql's GET DIAGNOSTICS statement to use SQL99-compatible
syntax.  Fix the RESULT_OID case, which never worked.  Add documentation.
2001-02-19 19:49:53 +00:00
Michael Meskes 826dc14d8f Synced gram.y and preproc.y. 2001-02-19 07:30:20 +00:00
Bruce Momjian da84545d61 Add copyright mentions, per Tom Lane. 2001-02-18 18:34:02 +00:00
Peter Eisentraut 215b90d3d7 Allow extract() to accept the same field selectors as date_part(), not just
the ones specified by SQL.
2001-02-18 18:06:10 +00:00
Tom Lane c3b00e7e29 Add --template option to createdb script to allow access to WITH TEMPLATE
option of CREATE DATABASE.  In pg_regress, create regression database
from template0 to ensure that any installation-local cruft in template1
will not mess up the tests.
2001-02-18 17:53:55 +00:00
Tom Lane 57e0847180 Change default commit_delay to zero, update documentation. 2001-02-18 04:50:43 +00:00
Tom Lane 33cc5d8a4d Change s_lock to not use any zero-delay select() calls; these are just a
waste of cycles on single-CPU machines, and of dubious utility on multi-CPU
machines too.
Tweak s_lock_stuck so that caller can specify timeout interval, and
increase interval before declaring stuck spinlock for buffer locks and XLOG
locks.
On systems that have fdatasync(), use that rather than fsync() to sync WAL
log writes.  Ensure that WAL file is entirely allocated during XLogFileInit.
2001-02-18 04:39:42 +00:00
Tom Lane 58c4ab9d62 Remove bogus set_ps_display call --- changing displayed status here is
either wrong or unnecessary in most cases, and on systems where setting
status takes a kernel call, the overhead of setting status three times
per command rather than two is annoying.
2001-02-18 04:28:31 +00:00
Tatsuo Ishii 2bc2738fc4 Fix a bug in psql. unescape() does not work for multi-byte encodings. 2001-02-17 10:03:33 +00:00
Tom Lane 81357b3c02 Seems a bad idea to assume that select(2) doesn't touch the input masks
if it returns EINTR.
2001-02-17 03:37:22 +00:00
Tom Lane b634118af9 Add current seek position to FDDEBUG output for FileRead,
FileWrite, FileSeek.
2001-02-17 01:00:04 +00:00
Tom Lane 6249971b41 Just noticed that use of 'volatile' in HPPA S_UNLOCK() was causing gcc
to generate unnecessarily stupid code.  Tweak macro to describe a series
of store-constant ops, not store/load/store/load/store/load/store.
2001-02-16 23:50:40 +00:00
Tom Lane 1ad93b7e45 Defend against starting a non-MULTIBYTE-enabled backend in a database
with encoding other than SQL_ASCII.  Per recent discussion in pghackers.
2001-02-16 18:50:40 +00:00
Peter Mount cdbd27cb23 Some more updates...
Fri Feb 17 15:11:00 GMT 2001 peter@retep.org.uk
        - Reduced the object overhead in PreparedStatement by reusing the same
          StringBuffer object throughout. Similarly SimpleDateStamp's are alse
          reused in a thread save manner.
        - Implemented in PreparedStatement: setNull(), setDate/Time/Timestamp
          using Calendar, setBlob(), setCharacterStream()
        - Clob's are now implemented in ResultSet & PreparedStatement!
        - Implemented a lot of DatabaseMetaData & ResultSetMetaData methods.
          We have about 18 unimplemented methods left in JDBC2 at the current
          time.
2001-02-16 16:45:01 +00:00
Tom Lane eb90c16dd7 ichar() has been renamed to chr(), so fix translation table. 2001-02-16 03:49:40 +00:00
Tom Lane a2dafc6416 Fix bugs in pltcl's new return_null command: it was liable to go belly up
if the return datatype's input converter was at all strict, because the
converter would get called on junk data when returning NULL.  Also
ensure that it gives an error rather than coredumping if someone tries
to use it in a trigger function.
2001-02-16 03:26:40 +00:00
Tom Lane 60d1d671a8 Fix erroneous sort request in pltcl selftest. 2001-02-16 03:22:41 +00:00
Tom Lane 13cc7eb3e2 Clean up two rather nasty bugs in operator selection code.
1. If there is exactly one pg_operator entry of the right name and oprkind,
oper() and related routines would return that entry whether its input type
had anything to do with the request or not.  This is just premature
optimization: we shouldn't return the single candidate until after we verify
that it really is a valid candidate, ie, is at least coercion-compatible
with the given types.

2. oper() and related routines only promise a coercion-compatible result.
Unfortunately, there were quite a few callers that assumed the returned
operator is binary-compatible with the given datatype; they would proceed
to call it without making any datatype coercions.  These callers include
sorting, grouping, aggregation, and VACUUM ANALYZE.  In general I think
it is appropriate for these callers to require an exact or binary-compatible
match, so I've added a new routine compatible_oper() that only succeeds if
it can find an operator that doesn't require any run-time conversions.
Callers now call oper() or compatible_oper() depending on whether they are
prepared to deal with type conversion or not.

The upshot of these bugs is revealed by the following silliness in PL/Tcl's
selftest: it creates an operator @< on int4, and then tries to use it to
sort a char(N) column.  The system would let it do that :-( (and evidently
has done so since 6.3 :-( :-().  The result in this case was just a silly
sort order, but the reverse combination would've provoked coredump from
trying to dereference integers.  With this fix you get more reasonable
behavior:
pltcl_test=# select * from T_pkey1 order by key1, key2 using @<;
ERROR:  Unable to identify an operator '@<' for types 'bpchar' and 'bpchar'
        You will have to retype this query using an explicit cast
2001-02-16 03:16:58 +00:00
Hiroshi Inoue b24b2a5be0 Add casting for numeric/float4/float8 type value
automatically to compensate the lack of automatic
conversion functionality of PostgreSQL server.
For example if there's a numeric type binding
   1.2567 --> 1.2567::numeric.
I hope this change would enable the use of numeric
type in MS-Access etc.

Thanks Hiroki Kataoka for his checking my code.
2001-02-16 03:10:09 +00:00
Tom Lane b29f68f611 Take OUTER JOIN semantics into account when estimating the size of join
relations.  It's not very bright, but at least it now knows that
A LEFT JOIN B must produce at least as many rows as are in A ...
2001-02-16 00:03:08 +00:00
Tom Lane 6da3b76a94 Add some notes about memory management of RI plans. 2001-02-15 21:57:43 +00:00
Tom Lane db3ac67d8f Update comments about memory management. 2001-02-15 21:47:08 +00:00
Tom Lane 5c2abb960d Update notes about memory context scheme. 2001-02-15 21:38:26 +00:00
Tom Lane 059e361481 Although we can't support out-of-line TOAST storage in indexes (yet),
compressed storage works perfectly well.  Might as well have a coherent
strategy for applying it, rather than the haphazard store-what-you-get
approach that was in the code before.  The strategy I've set up here is
to attempt compression of any compressible index value exceeding
BLCKSZ/16, or about 500 bytes by default.
2001-02-15 20:57:01 +00:00
Tom Lane 39b9c9f221 Reduce default selectivity estimates for geometric operators; it seems
the old ones were not small enough to ensure r-tree and gist indexes would
get picked when available.  These numbers are totally bogus anyway, but
in the absence of any real estimation technique, we'd like to select
indexes when available ...
2001-02-15 17:55:17 +00:00
Tom Lane 83b4ab53ad Update a couple of obsolete comments. 2001-02-15 17:46:40 +00:00