Commit Graph

6591 Commits

Author SHA1 Message Date
Bruce Momjian 0971d894b9 New resultmap for Alpha, from Ryan Kirkpatrick 2000-07-05 04:28:19 +00:00
Peter Eisentraut b5e2dafd39 Fix broken pg_dump makefile 2000-07-04 19:52:00 +00:00
Jan Wieck d819f5fe83 Moving toaster out of NO ELOG area in heap_update().
Jan
2000-07-04 17:11:40 +00:00
Bruce Momjian 651e98b17f make TEMP -> TEMPORARY 2000-07-04 16:57:49 +00:00
Bruce Momjian edbe00a720 Make pgdump_oid a temp table. Rename to pg_dump_oid. 2000-07-04 16:57:18 +00:00
Peter Eisentraut 554e56e628 Expand secondary password file feature, so that you can use these
files to restrict the set of users that can connect to a database
but can still use the pg_shadow password. (You just leave off the
password field in the secondary file.)
2000-07-04 16:32:01 +00:00
Peter Eisentraut 1c2f735aa7 Fix thinko in my last pg_dumpall change 2000-07-04 16:29:59 +00:00
Bruce Momjian 500b62b057 pg_dump patch from Philip Warner 2000-07-04 14:25:28 +00:00
Tom Lane cdeca5f590 Make toast-table creation and deletion work somewhat reliably.
Don't go through pg_exec_query_dest(), but directly to the execution
routines.  Also, extend parameter lists so that there's no need to
change the global setting of allowSystemTableMods, a hack that was
certain to cause trouble in the event of any error.
2000-07-04 06:11:54 +00:00
Tom Lane 3b61ba6d5c DataFill() has no business resetting xact status bits
in the infomask of the provided tuple.
2000-07-04 02:40:56 +00:00
Vadim B. Mikheev d0273c07ac misc 2000-07-04 01:49:44 +00:00
Vadim B. Mikheev e1a118e5e6 unlock buffer before releasing in heap_insert
+unlock buffer in heap_fetch under !ItemIdIsUsed().
2000-07-04 01:39:24 +00:00
Tom Lane 13647ad6aa tuptoaster.h should surely not #include postgres.h. 2000-07-04 00:04:03 +00:00
Tom Lane e81fe1e8a0 Add missing #include for TOAST. 2000-07-03 23:58:32 +00:00
Jan Wieck 2f12c9f182 TOAST changes to catalog
Jan
2000-07-03 23:19:04 +00:00
Jan Wieck 57d8080a40 TOAST
WARNING: This is actually broken - we have self-deadlocks
	         due to concurrent changes in buffer management.
			 Vadim and me are working on it.

Jan
2000-07-03 23:10:14 +00:00
Peter Eisentraut ef5bea51e1 Move global internal files to PGDATA/global. 2000-07-03 20:48:46 +00:00
Peter Eisentraut e2d3932e0e Move PGPORT envar handling to ResetAllOptions(). Improve long options
parsing to not clobber the optarg string -- so that we can bring
SetOptsFile() up to speed.
2000-07-03 20:46:10 +00:00
Peter Eisentraut 51afb9305c Have pg_dumpall write CREATE USER and CREATE GROUP commands instead of raw
COPYs of pg_shadow and pg_group.

It also turns out that pg_dumpall was all but broken for multiple servers
running at non-standard port numbers. You might get the users and groups
from one server and the databases from another. Fixed that.

A little user interface and code cleanup along with that. This also takes
care of the portability bug discussed in "[BUGS] pg_dumpall" in March 2000.
2000-07-03 16:35:39 +00:00
Bruce Momjian efcff3da16 In the attache is new (correct) version. I add TZ (timezone) support
for
to_char() too.

Karel
2000-07-03 16:01:33 +00:00
Hiroshi Inoue 61768d8cac Add a check of HEAP_MARKED_FOR_UPDATE in HeapTupleSatisfiesDirty().
This enables unique constraint check in case of SELECT FOR UPDATEd.
2000-07-03 04:45:09 +00:00
Tom Lane c4f9eaa608 Clean up memory-context stuff, other minor infelicities. 2000-07-03 03:57:03 +00:00
Tom Lane 6ac19b165d Remove unused variable. (Hey Peter, you use gcc, why didn't you
notice this warning?)
2000-07-03 03:27:31 +00:00
Vadim B. Mikheev 1b67fe17b8 heap' logging 2000-07-03 02:54:21 +00:00
Bruce Momjian 80c646958a Attached is a new patch which addresses this problem. (oids in
regression tests).

Chris Bitmead
2000-07-02 22:01:27 +00:00
Peter Eisentraut 6fb9d2e347 Version number now set in configure, available through Makefile.global
and config.h. Adjusted all referring code.

Scrapped pg_version and changed initdb accordingly. Integrated
src/utils/version.c into src/backend/utils/init/miscinit.c. Changed all
callers.

Set version number to `7.1devel'. (Non-numeric version suffixes now allowed.)
2000-07-02 15:21:27 +00:00
Tom Lane 07dfe97731 Don't run in CacheMemoryContext more than necessary. 2000-07-02 05:38:40 +00:00
Tom Lane d003213225 Don't run in CacheMemoryContext longer than necessary. 2000-07-02 04:46:09 +00:00
Tom Lane 72164e86a6 Remove memory leak from VACUUM parsing. 2000-07-02 04:04:09 +00:00
Tom Lane 57eeb0d315 New memmgr logic in xact.c failed if AbortTransaction() is called when
there is no open transaction.
2000-07-02 02:28:38 +00:00
Bruce Momjian e225260440 Back out Karels to_char changes. 2000-07-01 21:27:14 +00:00
Peter Eisentraut b150906b89 We don't need config.status substituting anything into Gen_fmgrtab.sh, we
just pass in CPP and AWK via the environment from the Makefile.
2000-07-01 21:16:44 +00:00
Peter Eisentraut 191870388d A little bit of clean-up/bug fix in Tcl build. Handle gracefully cases
where someone wants to build these but hasn't configured for Tcl.
2000-07-01 15:02:31 +00:00
Bruce Momjian 99212a4847 In the attache is new to_date()/to_timestamp() version.
Now the to_timestamp() support WW,W,J,SSSS,DDD conversion from strings and
the am/pm bug is fixed, the to_char() use week-of-year (WW) full compatible
with Oracle.

 This patch update relevant regress-tests and docs too.

                                        Karel
~
~
2000-07-01 14:10:32 +00:00
Bruce Momjian 2f131ca588 Fix select '1--2'; for PEter. 2000-06-30 18:03:40 +00:00
Peter Eisentraut 385470f8c6 Fixes for Solaris/cc suggested by <pgsql-hackers@thewrittenword.com>
Don't use DISABLE_COMPLEX_MACRO on Solaris. Don't define the
replacement function in the header file. Use -KPIC, not -K PIC.
Use CC to link C++ libraries, not ld/ar.

Eliminate file not found warnings in tcl build code.
2000-06-30 16:11:02 +00:00
Tom Lane 3513f4d162 RemoveView was doing things the hard way... 2000-06-30 07:06:05 +00:00
Tom Lane b41f4ab8c4 Use a private memory context to store rule information in each relcache
entry that has rules.  This allows us to release the rule parsetrees
on relcache flush without needing a working freeObject() routine.
Formerly, the rule trees were leaked permanently at relcache flush.
Also, clean up handling of rule creation and deletion --- there was
not sufficient locking of the relation being modified, and there was
no reliable notification of other backends that a relcache reload
was needed.  Also, clean up relcache.c code so that scans of system
tables needed to load a relcache entry are done in the caller's
memory context, not in CacheMemoryContext.  This prevents any
un-pfreed memory from those scans from becoming a permanent memory
leak.
2000-06-30 07:04:23 +00:00
Bruce Momjian c9ec78a6b8 Fix quotes in /* */ comments in psql. 2000-06-29 16:27:57 +00:00
Tom Lane 43ba1b4420 Add test code to copy all parse/plan trees. Repair essential omissions
in copyfuncs and equalfuncs exposed by regression tests.  We still have
some work to do: these modules really ought to handle most or all of
the utility statement node types.  But it's better than it was.
2000-06-29 07:35:57 +00:00
Tom Lane 6a7b40d909 Rearrange config.h entries into a more sensible order, and add some
documentation.  Let's try to keep this file a bit neater in future,
hmm?  Also (to get back to the original point) update info about
FUNC_MAX_ARGS, and add additional config symbols for debugging
new memory management changes.
2000-06-29 05:50:29 +00:00
Tom Lane d1080d19b1 Remove freefuncs.c, which hasn't been used in a long time and is not
worth the effort to continue to maintain.  Since freeObject() is not
capable of coping with cases like multiple links to a node, it's
unlikely that it ever will be useful again.  We now have memory
context management that offers a faster and more reliable way of
getting rid of arbitrary node trees (at the cost of having to know
in advance of building the tree that you'll want to get rid of it).
2000-06-29 02:26:23 +00:00
Tom Lane feb48f41af Add SIGFPE to list of signals never to block. #ifdef all signals in
that list to cope with platforms that don't have them all.
2000-06-29 02:17:42 +00:00
Bruce Momjian 932d1e5f9e Add #ifdef for LC_MESSAGES, because it is not ANSI C standard, and BSDI
does not have it.
2000-06-29 01:19:36 +00:00
Peter Eisentraut 44f64dd3ea Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
2000-06-28 18:30:16 +00:00
Tom Lane 5ac1eac2a6 Suppress memory leak in COPY WITH OIDS TO wherever. 2000-06-28 06:05:36 +00:00
Tom Lane 13612a97b9 Repair incorrect assumption that all versions of 'install' know
how to install multiple files in one invocation.
2000-06-28 05:09:37 +00:00
Tom Lane 1aebc3618a First phase of memory management rewrite (see backend/utils/mmgr/README
for details).  It doesn't really do that much yet, since there are no
short-term memory contexts in the executor, but the infrastructure is
in place and long-term contexts are handled reasonably.  A few long-
standing bugs have been fixed, such as 'VACUUM; anything' in a single
query string crashing.  Also, out-of-memory is now considered a
recoverable ERROR, not FATAL.
Eliminate a large amount of crufty, now-dead code in and around
memory management.
Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and
backend startup.
2000-06-28 03:33:33 +00:00
Bruce Momjian b601c8d882 Tamotsu Nakagawa has posted a fix for this to a local mail list in
Japan. Can someone comment on this? According to him, with the patch
now only the geometry test fails.

 Tatsuo Ishii
2000-06-27 18:08:49 +00:00
Peter Eisentraut 5bb8b62983 Makefile cleanup for bin and pl subtrees. They should now support
all the standard semantics. Also get rid of Makefile.in's on the
way and instead declare all variables in Makefile.global.
2000-06-27 00:32:06 +00:00
Bruce Momjian ecef326850 Fix \pset null to use ', not ". 2000-06-26 14:16:34 +00:00
Peter Eisentraut c4e63f70fa Added new commands and intelligence to psql tab completion. 2000-06-25 14:25:51 +00:00
Peter Eisentraut c7558b3bae Relaxed pickiness about user and group commands in transaction blocks. 2000-06-25 14:24:59 +00:00
Peter Eisentraut c446509565 Second pass over run-time configuration system. Adjust priorities on some
option settings. Sort out SIGHUP vs BACKEND -- there is no total ordering
here, so make explicit checks. Add comments explaining all of this.
Removed permissions check on SHOW command.

Add examine_subclass to the game, rename to SQL_inheritance to fit the
official data model better. Adjust documentation.

Standalone backend needs to reset all options before it starts. To
facilitate that, have IsUnderPostmaster be set by the postmaster itself,
don't wait for the magic -p switch.

Also make sure that all environment variables and argv's survive
init_ps_display(). Use strdup where necessary.

Have initdb make configuration files (postgresql.conf, pg_hba.conf) mode
0600 -- having configuration files is no fun if you can't edit them.
2000-06-22 22:31:24 +00:00
Peter Eisentraut bfdb695b85 Cleaned up PL/pgSQL build. Fixed a couple of copyandpaste'os in the
interfaces and interfaces/odbc make files. Adjusted regression test
driver to start building and installing in the top level directory.
2000-06-20 16:40:19 +00:00
Tom Lane 9f1a223046 Make renaming a temp table behave sensibly. We don't need to touch
the underlying table at all, just change the mapping entry ... but
that logic was missing.
2000-06-20 06:41:13 +00:00
Tom Lane 38db5fab29 Make inheritance planning logic a little simpler and clearer,
hopefully even a little faster.
2000-06-20 04:22:21 +00:00
Tom Lane 996659f255 Fix handling of type tuple associated with a temp relation. We have
to apply the tempname->realname mapping to type name lookup as well
as relation name lookup, else the type tuple will not be found when
wanted.  This fixes bugs like this one:
create temp table foo (f1 int);
select foo.f2 from foo;
ERROR:  Unable to locate type name 'foo' in catalog
2000-06-20 01:41:22 +00:00
Tom Lane a1dfaef6c6 Modify index-opening code to guarantee that the indexes of a relation
are opened in a consistent order by different backends (I ordered them
by index OID because that's easy, but any other consistent order would
do as well).  This avoids potential deadlock for index types that we
acquire exclusive locks on ... ie, rtree.
2000-06-19 23:40:48 +00:00
Tom Lane 1f75cdd5ed Ensure that kernel error code is included in smgr-level error reports.
Tweak mdcreate a little bit so that it returns the right errno.
2000-06-19 23:37:08 +00:00
Peter Eisentraut 81b30f2cb4 Integrated ODBC driver into regular build. No more standalone business,
which didn't work anyway. Had to back out unixodbc related patch which
broke the regular ODBC build.
2000-06-19 16:58:48 +00:00
Bruce Momjian b5d4d234cb Rename HAVE_SQLGETPRIVATEPROFILESTRING to something resonable in length
and readability.
2000-06-19 13:39:03 +00:00
Bruce Momjian 14f6587650 fix HAVE_SQLGETPRIVATEPROFILESTRING define 2000-06-19 13:35:30 +00:00
Tom Lane c590273fef Clean up bogosities in pg_opclass, pg_amop, pg_amproc. There are amproc
entries now for int8 and network hash indexes.  int24_ops and int42_ops
are gone.  pg_opclass no longer contains multiple entries claiming to be
the default opclass for the same datatype.  opr_sanity regress test
extended to catch errors like these in the future.
2000-06-19 03:55:01 +00:00
Bruce Momjian a53dc5ee61 Linux/alpha patch. 2000-06-19 00:51:23 +00:00
Tom Lane 1ee26b7764 Reimplement nodeMaterial to use a temporary BufFile (or even memory, if the
materialized tupleset is small enough) instead of a temporary relation.
This was something I was thinking of doing anyway for performance, and Jan
says he needs it for TOAST because he doesn't want to cope with toasting
noname relations.  With this change, the 'noname table' support in heap.c
is dead code, and I have accordingly removed it.  Also clean up 'noname'
plan handling in planner --- nonames are either sort or materialize plans,
and it seems less confusing to handle them separately under those names.
2000-06-18 22:44:35 +00:00
Tom Lane b4e906f191 Reinstate BufFileTell(). 2000-06-18 03:11:40 +00:00
Tom Lane edf0b5f0db Get rid of IndexIsUniqueNoCache() kluge by the simple expedient of
passing the index-is-unique flag to index build routines (duh! ...
why wasn't it done this way to begin with?).  Aside from eliminating
an eyesore, this should save a few milliseconds in btree index creation
because a full scan of pg_index is not needed any more.
2000-06-17 23:41:51 +00:00
Tom Lane d03a933ec5 Fix performance problems with pg_index lookups (see, for example,
discussion of 5/19/00).  pg_index is now searched for indexes of a
relation using an indexscan.  Moreover, this is done once and cached
in the relcache entry for the relation, in the form of a list of OIDs
for the indexes.  This list is used by the parser and executor to drive
lookups in the pg_index syscache when they want to know the properties
of the indexes.  Net result: index information will be fully cached
for repetitive operations such as inserts.
2000-06-17 21:49:04 +00:00
Tom Lane 9cf80f2f55 Clean out another pocket of functions called via nonspecific function
pointers, namely the catcache tuple fetch routines.  Also get rid of
the unused and possibly confusing 'size' field in struct cachedesc.
Since it doesn't allow for variable-length fields, anyone who
actually trusted it would likely be making a mistake...
2000-06-17 04:56:39 +00:00
Peter Eisentraut 1652d43358 Remove fmgrstamp-h business -- not needed and confusing
Add options to configure to automatically build for Kerberos
support; no more editing of make files.
2000-06-17 00:10:40 +00:00
Tom Lane 648029ec2e Repair unforgivably brain-dead representation of CaseExpr nodes in
stored rules.  Bump catversion to reflect incompatibility.
2000-06-16 05:27:03 +00:00
Bruce Momjian f7f177d372 /contrib patch from Karel. 2000-06-15 18:55:34 +00:00
Tom Lane a62d8393ef Repair Large Object bugs demonstrated by Ian Grant's example. inv_write
was inappropriately relying on rel->rd_nblocks to tell if the LO is
empty (apparently a hack to get around a long-dead index bug), causing
misbehavior on a written-but-never-vacuumed LO.  Also, inv_read failed
to cope gracefully with 'holes' (unwritten regions) in the object.
2000-06-15 06:07:34 +00:00
Bruce Momjian 946e80c435 Final #include cleanup. 2000-06-15 04:10:30 +00:00
Bruce Momjian df43800fc8 Clean up #include's. 2000-06-15 03:33:12 +00:00
Bruce Momjian e362d4e1ea #include cleanups 2000-06-15 00:52:26 +00:00
Bruce Momjian d540a9a6bd Update include cleaning scripts. 2000-06-14 22:33:06 +00:00
Bruce Momjian 8e6697fcd9 Update include scripts 2000-06-14 22:28:16 +00:00
Bruce Momjian 7fe8722295 Add () around define -1. 2000-06-14 18:59:42 +00:00
Peter Eisentraut 44d1abebb4 Big warnings cleanup for Solaris/GCC. Down to about 40 now, but
we'll get there one day.

Use `cat' to create aclocal.m4, not `aclocal'. Some people don't
have automake installed.

Only run the autoconf rule in the top-level GNUmakefile if the
invoker specified `make configure', don't run it automatically
because of CVS timestamp skew.
2000-06-14 18:18:01 +00:00
Bruce Momjian e9ca59fdbc Back out libpgtcl tcl/tksh includes. 2000-06-14 17:07:31 +00:00
Bruce Momjian 2635bef524 Remove -O0 linux ppc flag 2000-06-14 17:01:35 +00:00
Tom Lane ff7b9f5541 I had overlooked the fact that some fmgr-callable functions return void
--- ie, they're only called for side-effects.  Add a PG_RETURN_VOID()
macro and use it where appropriate.  This probably doesn't change the
machine code by a single bit ... it's just for documentation.
2000-06-14 05:24:50 +00:00
Bruce Momjian 69cd08d9f7 Fix for memory leak from Denis Perchine 2000-06-14 04:53:44 +00:00
Bruce Momjian a194574dde > If read or write fails. Position will left the same. This
> situation is already tracked in File routines, but a little bit
> incorrectly.

> After small survey in Linux kernel code, I am not sure about
> it.  New patch set pos to unknown in the case of read/write
> fails. And do lseek again.

> Here is the full patch for this. This patch reduce amount of
> lseek call ten ti mes for update statement and twenty times for
> select statement. I tested joined up date and count(*) select
> for table with rows > 170000 and 10 indices.  I think this is
> worse of trying. Before lseek calls account for more than 5% o
> f time.  Now they are 0.89 and 0.15 respectevly.
>
> Due to only one file modification patch should be applied in
> src/backedn/stora ge/file/ dir.

-- Sincerely Yours,
Denis Perchine
2000-06-14 03:19:24 +00:00
Bruce Momjian d1b90bfd45 OK, I have tidied up todays (13th) snapshot with the attached patch, I
have'nt r un autoconf to create a new configure, I guess that's done by
the smapshot process, I had to remove a line from interface/odbc/
GNUMakefile to get it to build, it was a autoconf variable that looks to
not be used anymore, I am assuming that this is  ok.

Nick Gorham
Easysoft Ltd
2000-06-14 02:43:46 +00:00
Bruce Momjian a13b3f8cb6 add missing files 2000-06-13 12:49:33 +00:00
Bruce Momjian 81fa9e0e56 in the Directory src/bin/pgtclsh there is a good mechanism to integrate
the
tcl-spec in the Makefile.
The patch in the attachemant does this in the src/interfaces/libpgtcl
too

Thank you
 Rudolf Weber
2000-06-13 09:16:39 +00:00
Tom Lane f2d1205322 Another batch of fmgr updates. I think I have gotten all old-style
functions that take pass-by-value datatypes.  Should be ready for
port testing ...
2000-06-13 07:35:40 +00:00
Bruce Momjian 6cb6d05456 Brand 7.1 release. Also update jdbc version in release branch. 2000-06-12 22:36:19 +00:00
Bruce Momjian 332f0f5fc0 Rename rule CURRENT to OLD in source tree. Add mapping for backward
compatiblity with old rules.
2000-06-12 19:40:58 +00:00
Bruce Momjian b45ea42234 Back out old unixodbc patches and apply new ones. Nick Gorham 2000-06-12 17:58:20 +00:00
Bruce Momjian b0929c82ac Put back old Makefiles, in pgsql and pgsql/src. 2000-06-12 16:37:22 +00:00
Bruce Momjian 36c926875a Add makefile to warn about not using gmake. 2000-06-12 03:54:03 +00:00
Bruce Momjian 3357e1d29e Back out pg_shadow changes to allow create table and locking permissions. 2000-06-12 03:41:03 +00:00
Bruce Momjian 64948dbe15 >> What happened to the patch I sent regarding the bug in the TCL
>> Makefile where the make bombs if "." is not in the builder's path?
>> The last I checked, it wasn't applied and the fix is very easy
>> (explicitly use "./" to call the script).

 SL Baur
2000-06-12 02:23:52 +00:00
Tom Lane 3477957b44 Update sequence-related functions to new fmgr style. Remove downcasing,
quote-stripping, and acl-checking tasks for these functions from the
parser, and do them at function execution time instead.  This fixes
the failure of pg_dump to produce correct output for nextval(Foo)
used in a rule, and also eliminates the restriction that the argument
of these functions must be a parse-time constant.
2000-06-11 20:08:01 +00:00
Peter Eisentraut 06cd0f1a32 Substituted new configure test for types of accept()
Interfaced a lot of the custom tests to the config.cache, in the process
made them separate macros and grouped them out into files. Made naming
adjustments.

Removed a couple of useless/unused configure tests.

Disabled C++ by default. C++ is no more special than Perl, Python, and Tcl.
And it breaks equally often. :(
2000-06-11 11:40:09 +00:00
Peter Eisentraut 6de89c9ab7 Moved the intricacies of the perl interface build into its own makefile
that now functions as a wrapper around the MakeMaker stuff. It might
even behave sensically when we have separate build dirs. Same for plperl,
which of course still doesn't work very well. Made sure that plperl
respects the choice of --libdir.

Added --with-python to automatically build and install the Python interface.
Works similarly to the Perl5 stuff.

Moved the burden of the distclean targets lower down into the source tree.
Eventually, each make file should have its own.

Added automatic remaking of makefiles and configure. Currently only for the
top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around
missing autoconf and aclocal. Start factoring out macros into their own
config/*.m4 files to increase readability and organization.
2000-06-10 18:02:12 +00:00
Tom Lane 2ae20ef98a Update regression tests for ONLY and other recent changes. 2000-06-10 05:19:26 +00:00
Tom Lane 936900074d Update rule dumper for the brave new world of ONLY. 2000-06-10 05:17:23 +00:00
Tom Lane 6bdbd41f2d nodeAppend tried to deal with multiple result relations, but apparently it never
really worked.  Until now.
2000-06-10 05:16:38 +00:00
Tom Lane 6307b01b53 Fix some more gratuitous breakage ... also throw in a couple of
fflush(stderr)'s for good luck.
2000-06-10 03:53:59 +00:00
Bruce Momjian 7bd58b4712 Fix initdb spaces problem. 2000-06-09 23:50:24 +00:00
Bruce Momjian d3ef753686 This patch fixes the 0-based/1-based result set indexing problem for
absolute.  It also makes it more compliant with the interface
specification in Sun's documentation;

1. absolute(0) should throw an exception.
2. absolute(>num-records) should set the current row to after the last
record in addition to returning false.
3. absolute(<num-records) should set the current row to before the first
record in addition to returning false.

These operations in the existing code just return false and don't change
current_row.

These changes required a minor change to relative(int) since it calls
absolute(int)

The attached patch is against the cvs repository tree as of this morning.

Also, who is in charge of maintaining the jdbc driver?  I'm working on
getArray for the jdbc2 driver, but it's going to require three more
classes to be added to the driver, and thus three more source files
in the repository.  Is there someone I can contact directly to ask about
this?

Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
2000-06-09 17:27:57 +00:00
Bruce Momjian 3fe3acb844 I have made the couple of mods required to make the odbc driver with
postgres build and use unixODBC (http://www.unixodbc.org)

This patch was applied against the postgresql-7.0beta1 build

Any problems let me know.

Nick Gorham
2000-06-09 16:03:09 +00:00
Bruce Momjian 85add42a57 I have large database and with this DB work more users and I very need
more restriction for fretful users. The current PG allow define only
NO-CREATE-DB and NO-CREATE-USER restriction, but for some users I need
NO-CREATE-TABLE and NO-LOCK-TABLE.

This patch add to current code NOCREATETABLE and NOLOCKTABLE feature:

CREATE USER username
    [ WITH
     [ SYSID uid ]
     [ PASSWORD 'password' ] ]
    [ CREATEDB   | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
->  [ CREATETABLE | NOCREATETABLE ] [ LOCKTABLE | NOLOCKTABLE ]
    ...etc.

 If CREATETABLE or LOCKTABLE is not specific in CREATE USER command,
as default is set CREATETABLE or LOCKTABLE (true).

 A user with NOCREATETABLE restriction can't call CREATE TABLE or
SELECT INTO commands, only create temp table is allow for him.

                                                Karel
2000-06-09 15:51:02 +00:00
Bruce Momjian a672e9650a Prompt username/password on stderr so:
pg_dump -o -u some_db >dump_file

works.
2000-06-09 12:33:42 +00:00
Bruce Momjian 1c33289fd9 Clean up regression for new 1st/9th/3rd fixes. 2000-06-09 11:40:03 +00:00
Bruce Momjian 4e859c3c8c Add inherit regression files. 2000-06-09 11:12:38 +00:00
Bruce Momjian dbf2fd2e0f The enclosed patch changes the behaviour of the "ordinal" ('TH') format for
to_char.  I don't know about the rest of the world, but the "standard" in
Australia is the following:

        1st, 2nd, 3rd, 4th - 9th
        10th - 19th
        21st, 22nd, 23rd, 24th - 29th (similarly for 30s - 90s)
        110th - 119th (and for all "teens")
        121st, 122nd, 123rd, 124th - 129th

I think you see the trend.  The current code works fine except that it
produces:

        111st, 112nd, 113rd, 114th - 119th
        211st, 212nd, 213rd, 214th - 219th ... and so on.

Without knowing anything about what's supported (and what isn't) in the usual
I18N libraries, should this type of behaviour be defined within the locales?

Daniel Baldoni
2000-06-09 03:18:34 +00:00
Tom Lane ce7746201b Cause inheritance patch to meet minimum coding standards (no gcc
warnings).
2000-06-09 03:17:13 +00:00
Tom Lane 7fca3f0379 Cleanup to ensure good state of derived files in tarballs. 2000-06-09 02:38:36 +00:00
Bruce Momjian 8c1d09d591 Inheritance overhaul by Chris Bitmead <chris@bitmead.com> 2000-06-09 01:44:34 +00:00
Tom Lane ae526b4070 Another round of updates for new fmgr, mostly in the datetime code. 2000-06-09 01:11:16 +00:00
Bruce Momjian 20ad43b576 Mark functions as static and ifdef NOT_USED as appropriate. 2000-06-08 22:38:00 +00:00
Bruce Momjian 5690933d6c Mark ImmediateSharedRelationCacheInvalidate as NOT_USED. 2000-06-08 19:51:06 +00:00
Bruce Momjian c709f56475 More odbc include cleanups 2000-06-08 17:08:54 +00:00
Bruce Momjian e1eee4cf06 Update odbc include 2000-06-08 17:07:34 +00:00
Bruce Momjian f7d979bc58 Fix ODBC for new binary fopen/open params 2000-06-08 16:40:51 +00:00
Bruce Momjian d42f9b59e9 Here is a patch for interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
It addresses three issues:

1. The problem with ResultSet's interface specifying 1-based indexing was
not quite fixed in 7.0.2.  absolute would stop the user form moving to the
first record (record 0 internally).

2. Absolute did not set current_row

3. For field.mod=-1, GetObject would try to return numeric values with a
precision of around 65000.  Now GetObject detects when field.mod==-1, and
passes that as the scale to getBigDecimal.  getBigDecimal detects when a
-1 is passed and simply does not scale the value returned.  You still get
the correct value back, it simply does not tweak the precision.

I'm working off of a source tree I just checked out from the
repository.  The diff is based on what was in the repository about ten
minutes ago.

----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------
2000-06-07 20:01:20 +00:00
Peter Eisentraut e3059fc0f5 Gen_fmgrtab.sh is strange: it is a platform dependent way (because it uses
CPP) to create platform independent files. Unfortunately, that means that
every config.status (or configure) run invariably causes a relink of the
postmaster and also that we can't put these files in the distribution
(usefully). So we make it a little smarter: when the output files already
exist and it notices that it would recreate them in identical form, it
doesn't touch them. In order to avoid re-running the make rule all the time
we update a timestamp file instead.

Update release_prep accordingly. Also make Gen_fmgrtab.sh use the awk that
is detected at configure time, not necessarily named `awk' and have it check
for exit statuses a little better.

In other news... Remove USE_LOCALE from the templates, it was set to `no'
everywhere anyway. Also remove YACC and YFLAGS from the templates, configure
is smart enough to find bison or yacc itself. Use AC_PROG_YACC for that
instead of the hand-crafted code. Do not set YFLAGS to `-d'. The make rules
that need this flag should explicitly invoke it. YFLAGS should be a user
variable. Update the makefiles to that effect.
2000-06-07 16:27:00 +00:00
Bruce Momjian 7d301947e5 Re-order pg_listener index so it can later be used in an index scan. 2000-06-07 04:09:44 +00:00
Bruce Momjian 75b950f668 New system index, initdb everyone. 2000-06-07 03:02:08 +00:00
Bruce Momjian 4bd5006812 Add index on pg_index.indrelid for Tom Lane. 2000-06-07 02:44:40 +00:00
Peter Eisentraut 5b9d0d9a5c Moved configure script from src/ to the top level directory. Moved
configuration helper things into config/ dir. Adjusted some relative paths
in makefiles.
2000-06-06 22:01:15 +00:00
Tom Lane 42ad25fcd1 init_fcache was being careless about using SearchSysCacheTuple result
over multiple lookups --- it should use SearchSysCacheTupleCopy instead.
This accounts for rare failures like 'init_fcache: null probin for procedure 481'
when running concurrently with a VACUUM.
2000-06-06 17:44:25 +00:00
Tom Lane e57e991e80 Improve comments for SearchSysCacheTuple and SearchSysCacheTupleCopy. 2000-06-06 17:02:38 +00:00
Tom Lane 05cd91a582 typeTypeName() must return a pstrdup'd copy of the type name, not a
direct pointer into the syscache entry for the type.  In some cases
the syscache entry might get flushed before we are done using the
returned type name.  This bug accounts for difficult-to-repeat
failures seen when INSERTs into columns of certain data types are
run in parallel with VACUUMs of system tables.  There may be related
problems elsewhere --- we need to take a harder look at uses of
syscache data.
2000-06-06 16:50:37 +00:00
Peter Eisentraut 4032a515d2 PGPORT envar was erroneously ignored by the backend 2000-06-06 16:04:32 +00:00
Peter Mount e3cc370d15 Added org/postgresql/DriverClass.java to the list of files removed by make clean (it's dynamically built)
Fixed Statement, so that the update count is valid when an SQL DELETE operation is done.
While fixing the update count, made it easier to get the OID of the last insert as well. Example is in example/basic.java
2000-06-06 11:06:09 +00:00
Peter Mount 0e38f0a1d1 Added some missing org.'s that prevented the use of the geometric types 2000-06-06 07:45:07 +00:00
Peter Mount d7dbba2659 Removed hardwired 8k limit on queries 2000-06-06 07:24:06 +00:00
Bruce Momjian 552d59353f Update for 7.0.2. 2000-06-05 17:07:56 +00:00
Tom Lane 48165ec226 Latest round of fmgr updates. All functions with bool,char, or int2
inputs have been converted to newstyle.  This should go a long way towards
fixing our portability problems with platforms where char and short
parameters are passed differently from int-width parameters.  Still
more to do for the Alpha port however.
2000-06-05 07:29:25 +00:00
Tom Lane c61db5ba2d Simplify build/install process for bki and description files. There's
no reason for them to be copied into src/backend rather than being
installed straight from the catalog subdirectory.  This also avoids
some peculiar behavior (bugs?) present in at least gmake 3.78.1: it
won't always update the bki files in backend/ even when the ones in
backend/catalog/ are newer.
2000-06-05 07:16:13 +00:00
Tom Lane 4863829c12 If user re-DECLAREs an existing cursor name, close the old cursor of
that name and issue a NOTICE to the effect that we did.  Previously,
code would try to assign the new cursor declaration to the old portal,
but this didn't work reliably since new parsetree is still sitting in
blank portal and is likely to get clobbered.
2000-06-04 22:08:53 +00:00
Tom Lane 9b5410aa03 Disallow CLOSE of reserved system portal names. 2000-06-04 22:04:32 +00:00
Tom Lane 2190cf2926 Repair bug reported by ldm@apartia.com: Append nodes, which don't
actually use their targetlist, are given a targetlist that is just a
pointer to the first appended plan's targetlist.  This is OK, but what
is not OK is that any sub-select expressions in said tlist were being
entered in the subPlan lists of both the Append and the first appended
plan.  That led to two startup and two shutdown calls for the same
plan node at exec time, which led to crashes.  Fix is to not generate
a list of subPlans for an Append node.  Same problem and fix apply
to other node types that don't have a real, functioning targetlist:
Material, Sort, Unique, Hash.
2000-06-04 20:50:50 +00:00
Bruce Momjian 54bce381a7 Remove FROM warning by fixing query. 2000-06-04 17:52:54 +00:00
Peter Eisentraut 0a54de8faf Removed ELOG_TIMESTAMPS #define in favor of two run-time
configuration options `Log_timestamp' and `Log_pid'.
2000-06-04 15:06:34 +00:00
Peter Eisentraut 209aa77d98 New ps display code, works on more platforms.
Install a default configuration file.

Clean up some funny business in the config file code.
2000-06-04 01:44:38 +00:00
Bruce Momjian 2ea370a3ce New warning code about auto-created range table entries. 2000-06-03 04:41:34 +00:00
Bruce Momjian 58785757dd More cleanup of c.h binary macros 2000-06-02 16:40:09 +00:00
Bruce Momjian a305c7d675 Reverse PG_BINARY defines 2000-06-02 16:33:17 +00:00
Bruce Momjian cc2b5e5815 Remove NT-specific file open defines by defining our own open macros for
"rb" and "wb".
2000-06-02 15:57:44 +00:00
Vadim B. Mikheev bf1c8f2b3b heap' xlog records 2000-06-02 10:20:27 +00:00
Tom Lane 664dd614d9 If create/drop database are going to call closeAllVfds(), they ought
to do it at the last moment before calling system() ... not at some
randomly-chosen earlier point in the routine ...
2000-06-02 04:04:54 +00:00
Tom Lane b659ab07a2 Create an fd.c entry point that is just like plain open(2) except that
it will close VFDs if necessary to surmount ENFILE or EMFILE failures.
Make use of this in md.c, xlog.c, and user.c routines that were
formerly vulnerable to these failures.  In particular, this should
handle failures of mdblindwrt() that have been observed under heavy
load conditions.  (By golly, every other process on the system may
crash after Postgres eats up all the kernel FDs, but Postgres will
keep going!)
2000-06-02 03:58:34 +00:00
Tom Lane bff5dce993 Correct portability problem introduced by yours truly --- I used a
conditional expression x?y:z in an awk program.  Seems old versions
of awk don't have that ...
2000-06-02 02:00:28 +00:00
Tom Lane a82471f9e4 Keep CVS quiet about derived file guc-file.c. 2000-06-02 00:04:26 +00:00
Tom Lane 0672a3c081 Lexer defended us against overlength plain identifiers, but not against
overlength quoted identifiers.  Death and destruction ensue...
2000-06-01 22:21:05 +00:00
Bruce Momjian bb8bda3918 The definition for "ProcessConfigFile()" in guc-file.l does not match
the prototype in guc.h.  The following patch corrects that.

Billy G. Allie
2000-06-01 16:46:50 +00:00
Tom Lane 64b4a48ddc Simplify overly-clever Make rule, which evidently confuses at least
some versions of gmake (mine didn't do the right thing, anyway).
2000-06-01 14:52:25 +00:00
Peter Mount 228a5e708c Removed timezone in ResultSet.getTimestamp() 2000-06-01 06:33:01 +00:00
Bruce Momjian b965c90365 More perl cleanup 2000-06-01 03:07:33 +00:00
Bruce Momjian 0cfe2374a7 Rename perl example eg directory to examples. 2000-06-01 03:05:24 +00:00
Bruce Momjian 726926a523 Update pgcvslog 2000-06-01 01:34:02 +00:00
Tom Lane cbf503180f Tweak recognition of range-clause pairs so that 'var > $1 AND var < $2'
(ie, parameters instead of consts) will be treated as a range query.
We do not know the actual selectivities involved, but it seems like
a good idea to use a smaller estimate than we would use for two unrelated
inequalities.
2000-05-31 15:38:53 +00:00
Peter Eisentraut 6a68f42648 The heralded `Grand Unified Configuration scheme' (GUC)
That means you can now set your options in either or all of $PGDATA/configuration,
some postmaster option (--enable-fsync=off), or set a SET command. The list of
options is in backend/utils/misc/guc.c, documentation will be written post haste.

pg_options is gone, so is that pq_geqo config file. Also removed were backend -K,
-Q, and -T options (no longer applicable, although -d0 does the same as -Q).

Added to configure an --enable-syslog option.

changed all callers from TPRINTF to elog(DEBUG)
2000-05-31 00:28:42 +00:00
Bruce Momjian 8a437bf523 Update pg_hba.conf with more examples 2000-05-30 17:39:56 +00:00
Bruce Momjian bb74b18dd0 Update pg_hba.conf.sample with better examples and descriptions 2000-05-30 17:18:25 +00:00
Bruce Momjian 2f52eee2d1 Copy pg_ident.conf.sample into /lib directory. Rename USERAUTH to
AUTHTYPE in config file.  Patch both branches.
2000-05-30 16:36:15 +00:00
Tom Lane aea9b6e20f Ooops, looks like I broke fastpath in last changes... 2000-05-30 07:09:23 +00:00
Hiroshi Inoue a3cd0654db Added header files required for ALTER TABLE DROP COLUMN
trial implementation.
2000-05-30 06:22:44 +00:00
Tom Lane 0f1e39643d Third round of fmgr updates: eliminate calls using fmgr() and
fmgr_faddr() in favor of new-style calls.  Lots of cleanup of
sloppy casts to use XXXGetDatum and DatumGetXXX ...
2000-05-30 04:25:00 +00:00
Bruce Momjian a12a23f0d0 Remove unused include files. Do not touch /port or includes used by defines. 2000-05-30 00:49:57 +00:00
Bruce Momjian 2937505a3e More <> cleanup 2000-05-29 21:26:04 +00:00
Bruce Momjian 6c944bf3cc Cleanup of <> and "" 2000-05-29 21:25:07 +00:00
Tom Lane 6ed00fee53 Convert array_map to use new fmgr interface. 2000-05-29 21:02:32 +00:00
Tom Lane 747527e545 Neglected to add fmgr.h to set of installed headers... 2000-05-29 20:51:35 +00:00
Tom Lane a030113197 Tweak fmgrtab generation so that the F_XXX macros that give OIDs for
built-in procedures are named after the prosrc field of pg_proc (ie,
the actual C function name), not the proname field.  This did not use
to make a difference back when the two were always the same, but in the
presence of overloaded proname values we'd best try to use the C name
instead.  AFAICT this change affects no existing code, but it is
necessary to be able to get at some built-in functions that no macro
was being generated for before.
2000-05-29 20:18:30 +00:00
Tom Lane 22a517a40c Repair problems with overrun of timezone name length. Increase MAXTZLEN
to 10, and be consistent about whether it counts the trailing null (it
does not).  Also increase MAXDATELEN to be sure no buffer overflows are
caused by the longer MAXTZLEN.
2000-05-29 19:16:57 +00:00
Bruce Momjian f089c36419 Add analyze.c file for split. 2000-05-29 17:44:17 +00:00
Bruce Momjian 35096b568e Split vacuum and analyze into separate files 2000-05-29 17:40:45 +00:00
Bruce Momjian 3d669b50ed Update messages. 2000-05-29 17:11:58 +00:00
Bruce Momjian 84a30b4c41 Make analyze do vacuum/analyze in one step. 2000-05-29 17:07:57 +00:00
Bruce Momjian 6d5cba7c31 More vacuum cleanup 2000-05-29 17:06:15 +00:00
Bruce Momjian d950c19747 more cleanup 2000-05-29 16:21:05 +00:00
Bruce Momjian ac4de0cc94 Add analyze log messages for verbose mode. 2000-05-29 16:06:37 +00:00
Bruce Momjian c3647c3d06 cleanup 2000-05-29 15:48:47 +00:00
Bruce Momjian 659f79be7a Allow vacuum to perform analyze with shared lock. Update cvs manual. 2000-05-29 15:44:55 +00:00
Tom Lane 091126fa28 Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
2000-05-29 05:45:56 +00:00
Tom Lane 18952f6744 Second round of fmgr changes: triggers are now invoked in new style,
CurrentTriggerData is history.
2000-05-29 01:59:17 +00:00
Bruce Momjian 147ccf5c80 More vacuum cleanups 2000-05-29 01:55:07 +00:00
Bruce Momjian f3650653c6 More vacuum renaming. 2000-05-29 01:46:00 +00:00
Tom Lane 80648891cc Miscellaneous cleanups of places that needed to account for new
pg_language entries.
2000-05-28 20:34:52 +00:00
Tom Lane ab843085f1 Constant-expression simplifier now knows how to simplify strict functions
that have at least one constant-NULL input, even if other inputs are
not constants.
2000-05-28 20:33:28 +00:00
Tom Lane 305d3ce576 Install fmgr rewrite doc as README file.
Need to update user docs still ...
2000-05-28 18:06:55 +00:00
Tom Lane 0a7fb4e918 First round of changes for new fmgr interface. fmgr itself and the
key call sites are changed, but most called functions are still oldstyle.
An exception is that the PL managers are updated (so, for example, NULL
handling now behaves as expected in plperl and plpgsql functions).
NOTE initdb is forced due to added column in pg_proc.
2000-05-28 17:56:29 +00:00
Tom Lane 67ad9a18c0 define YY_NEVER_INTERACTIVE for flex, to persuade flex that it's not
necessary to call isatty() for each and every received query.  That's
one less kernel call per query cycle ...
2000-05-27 05:13:38 +00:00
Bruce Momjian d45f7dfdca Update kerberos patch 2000-05-27 04:13:05 +00:00
Bruce Momjian 632a7ed759 Back out kerberos changes. Causes compile problems. 2000-05-27 03:58:20 +00:00
Bruce Momjian 9500b35f17 Patch for Kerberos V.
Most (nearly all) of the work was done by David Wragg <dpw@doc.ic.ac.uk>

He patched 6.5.3. I've updated it for 7.0RC5.

It works for MIT kerberos 1.1.1 (and previously for 1.0.6 as well).

I've got the patch against 6.5.3, plus kerberized RPMS.

Mike Wyer <mw@doc.ic.ac.uk>     ||         "Woof?"
2000-05-27 03:39:33 +00:00
Bruce Momjian ddae527c96 Remove // comments from ODBC. 2000-05-27 03:35:14 +00:00
Bruce Momjian c328e75a6f Remove pgaccess dll's from the distribution. 2000-05-27 03:14:10 +00:00
Bruce Momjian 82e2fe9cbc Clean up pg_hba.conf 2000-05-27 02:19:44 +00:00
Bruce Momjian ba1578aa8f Improve pg_hba.conf examples 2000-05-27 01:32:01 +00:00
Tom Lane b71761d280 Reduce eqsel()'s fudge-factor for estimating the frequency of values
other than the most common value in a column.  We had had 0.5, make it
0.1 to make it more likely that an indexscan will be chosen.  Really
need better statistics instead, but this should stem the bleeding
meanwhile ...
2000-05-26 17:19:15 +00:00
Bruce Momjian be6e7717db Fix \h SELECT to not show SELECT INTO. 2000-05-26 15:47:18 +00:00
Tatsuo Ishii 23b0387a94 Fix too long syslog message problem 2000-05-26 12:17:48 +00:00
Tom Lane 8bba4b4e0e Generate a reasonable error message when an aggregate function is applied
to an undecorated relation name (cf. example from Ed Loehr, 5/25/00).
2000-05-26 03:56:40 +00:00
Bruce Momjian cf169e0088 Spell fix 2000-05-26 03:15:18 +00:00
Tom Lane d4e27596cf More paranoia about global variables containing references to long-
since-closed file descriptors...
2000-05-26 01:38:08 +00:00
Tom Lane 2af53f3762 After closing frontend socket, set MyProcPort->sock = -1 to ensure that
subsequent I/O attempts fail cleanly.  I'm speculating about failure
scenarios in which we do pq_close, then something in a proc_exit routine
opens a file (re-using that kernel FD number), then something else
fails and tries to write an elog message to the frontend ... message
ends up in opened file, oops.  No known examples of this but it seems
like a potential hole.
2000-05-26 01:26:19 +00:00
Tom Lane 39725e56e8 Add some elog(DEBUG)'s to help diagnose mdblindwrt failures. 2000-05-25 23:30:20 +00:00
Tom Lane 92286bd576 Clean up sloppy coding of _outAExpr(). 2000-05-25 22:43:12 +00:00
Tom Lane ff566b2241 Modify raw parsetree representation returned by gram.y for SubLinks:
the oper field should be a valid Node structure so it can be dumped by
outfuncs.c without risk of coredump.  (We had been using a raw pointer
to character string, which surely is NOT a valid Node.)  This doesn't
cause any backwards compatibility problems for stored rules, since
raw unanalyzed parsetrees are never stored.
2000-05-25 22:42:19 +00:00
Tom Lane 610abfd57b Do table renaming in a sane order: physical file rename must happen
*last*, after all updating of system catalogs.  In old code, an error
detected during TypeRename left the relation hosed.  Also, add a call
to flush the relation's relcache entry, rather than trusting to shared
cache invalidation to flush it for us.
2000-05-25 21:30:20 +00:00
Tom Lane 445f1acf7a heap_drop() should flush the relcache entry for the
relation being dropped.
2000-05-25 21:25:32 +00:00
Tom Lane 69cc16f47e Quote database name so that not-all-lowercase names are handled safely. 2000-05-25 20:18:15 +00:00
Bruce Momjian 61f5e13c43 ! * Users doing non-blocking connections need to handle the reset
!        * themselves, they'll need to check the connection status if we
!        * return an error.

Alfred Perlstein
2000-05-25 19:09:55 +00:00
Tatsuo Ishii 07d4d36aae On solaris, createdb/dropdb fails because of strange behavior of system().
(it returns error with errno ECHILD upon successful completion of commands).
This fix ignores an error from system() if errno == ECHILD.
2000-05-25 06:53:43 +00:00
Tom Lane c439756ffd Make the world safe for QNX's busted shell ... 2000-05-24 22:43:59 +00:00
Tom Lane ae8a2c3589 Make the world safe for QNX's busted shell ... 2000-05-24 22:32:59 +00:00
Marc G. Fournier 69b323f4bc add a --with-setproctitle switch to configure that leaves the use of setproctitle()
disabled by default ...
2000-05-24 14:58:21 +00:00
Bruce Momjian f19ae14612 Update so init displays status with setproctitle too, like the rest of them. 2000-05-24 00:24:17 +00:00
Bruce Momjian a267c88d3b Make setproctitle update for every query. 2000-05-24 00:14:26 +00:00
Bruce Momjian 962c258027 Comment out no-op ps updates for setproctitle(), until we figure out
what to do.
2000-05-23 22:50:55 +00:00
Bruce Momjian d264fb4157 comment cleanup 2000-05-23 22:16:27 +00:00
Tom Lane 1c5b902018 Fix problem in which sloppily-coded test in ExecInitIndexScan would
think that both sides of indexqual look like index keys.  An example is
create table inside (f1 float8 primary key);
create table outside (g1 float8, g2 float8);
select * from inside,outside where f1 = atan2(g1+1, g2);
ERROR:  ExecInitIndexScan: both left and right ops are rel-vars
(note that failure is potentially platform-dependent).  Solution is a
cleanup I had had in mind to make anyway: functional index keys should
be represented as Var nodes in the fixed indexqual, just like regular
index keys.
2000-05-23 16:56:37 +00:00
Tom Lane 1c8244ec67 Twiddle C++ configuration checks so that we #include <string> (if
it exists) before testing 'using namespace std'.  This is necessary
on some C++ setups where the compiler won't take a 'using' until
you've included a header that mentions namespace std.  (Pretty braindead
if you ask me, but...)
2000-05-23 04:55:44 +00:00
Tom Lane ac6637485b Transmit -I switches selected by configure (particularly those from
--with-includes) to makefiles for pltcl and plperl, so that these
switches will be used even though we do not want other top-level
CFLAGS.  Ain't it fun trying to support multiple-compiler platforms?
2000-05-23 02:12:46 +00:00
Tom Lane aca5b34427 Cast parameters to ckfree to (char *) to suppress compiler warnings. 2000-05-23 01:59:05 +00:00
Bruce Momjian b1b9059427 Irix fixes from Murad Nayal 2000-05-22 23:56:44 +00:00
Bruce Momjian 569a1431ca Cleanup 2000-05-22 02:41:39 +00:00
Bruce Momjian 0460f0502b I am attempting to integrate postgres (v 7.0) with an open source
project I am working on (Recall - a distributed, fault-tolerant,
replicated, storage framework @ http://www.fault-tolerant.org).
Recall is written in C++.  I need to include the postgres headers and
there are some problems when including the headers w/C++.

Attached is a patch generated from postgres/src that fixes my problems.
I was hoping to get this into the main source.  It's very small (2k) and
3 files are changed: backend/utils/fmgr/fmgr.c,
backend/utils/Gen_fmgrtab.sh.in, and include/access/tupdesc.h.

In C++, you get a multiply defined symbol because the variable
(FmgrInfo *fmgr_pl_finfo) is defined in the header (the patch moves it
to the .c file).  The other problem in tupdesc.h is the use of typeid
is a problem in c++ (I renamed it to oidtypeid).

Thanks,
Neal Norwitz
2000-05-22 02:34:23 +00:00
Tom Lane 1f0aff03c0 Remove calls to getprotobyname(), which we now know leaks memory on
some platforms --- and I also see that it is documented as not thread-
safe on HPUX and possibly other platforms.  No good reason not to just
use IPPROTO_TCP constant from <netinet/in.h> instead.
2000-05-21 21:19:53 +00:00
Tom Lane 9dab9ab5e4 Repair memory leaks that caused CacheCxt to grow without bound. We
really ought to fix relcache entry construction so that it does not
do so much with CurrentMemoryContext = CacheCxt.  As is, relatively
harmless leaks in either sequential or index scanning translate to
permanent leaks if they occur when called from relcache build.
For the moment, however, the path of least resistance is to repair
all such leaks...
2000-05-21 02:28:55 +00:00
Tom Lane aa16179118 Add debug code to aid in memory-leak tracking: if SHOW_MEMORY_STATS is
defined then statistics about memory usage of all the global memory
contexts are printed after each commit.
2000-05-21 02:23:30 +00:00
Tom Lane 25a7a7f446 Clean up grotty references to CacheCxt (externs inside functions,
duplicate global declarations, no points for style at all!)
2000-05-20 23:11:29 +00:00
Tatsuo Ishii 1a6daef70d Enhance multibyte support.
SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya
2000-05-20 13:12:26 +00:00
Tatsuo Ishii f1cb756c38 Add KEEPALIVE option to the socket of backend. This will automatically
terminate the backend that has no frontend anymore.
2000-05-20 13:10:54 +00:00
Tom Lane 8b5b3e0011 pg_dump barfs on negative values for index column numbers --- like, say,
an index on a table's OID column.  Mea maxima culpa ... but how'd we get
through beta with no one noticing this?
2000-05-19 23:00:00 +00:00
Tom Lane f923260ec8 Revise FlushRelationBuffers/ReleaseRelationBuffers per discussion with
Hiroshi.  ReleaseRelationBuffers now removes rel's buffers from pool,
instead of merely marking them nondirty.  The old code would leave valid
buffers for a deleted relation, which didn't cause any known problems
but can't possibly be a good idea.  There were several places which called
ReleaseRelationBuffers *and* FlushRelationBuffers, which is now
unnecessary; but there were others that did not.  FlushRelationBuffers
no longer emits a warning notice if it finds dirty buffers to flush,
because with the current bufmgr behavior that's not an unexpected
condition.  Also, FlushRelationBuffers will flush out all dirty buffers
for the relation regardless of block number.  This ensures that
pg_upgrade's expectations are met about tuple on-row status bits being
up-to-date on disk.  Lastly, tweak BufTableDelete() to clear the
buffer's tag so that no one can mistake it for being a still-valid
buffer for the page it once held.  Formerly, the buffer would not be
found by buffer hashtable searches after BufTableDelete(), but it would
still be thought to belong to its old relation by the routines that
sequentially scan the shared-buffer array.  Again I know of no bugs
caused by that, but it still can't be a good idea.
2000-05-19 03:22:31 +00:00
Tom Lane db90fdf9ab Correct busted syntax of CC invocation for tas.s. 2000-05-19 02:50:32 +00:00
Bruce Momjian e7be9d3303 Unset PGHOST 2000-05-18 16:11:39 +00:00
Bruce Momjian 6108a7ed6a Change remove function warning for built-ins. 2000-05-18 16:09:38 +00:00
Bruce Momjian 61f06bc2f1 Use postmaster -i only on certain platforms. 2000-05-18 15:58:43 +00:00
Bruce Momjian feaf1fc137 Throw NOTICE on built-in function removal 2000-05-18 15:45:00 +00:00
Bruce Momjian e17cfa8ff1 Add QNX localhost flag to regression tests 2000-05-18 15:37:56 +00:00
Bruce Momjian f63ba5cd6a Fix WARN->NOTICE in docs. Change libpgeasy connection parameters to use
PQconnectdb() style connections.
2000-05-18 14:24:38 +00:00
Tom Lane ba26aeebc1 Reduce COPY IN lock from AccessExclusive to a more reasonable
RowExclusive (my fault).  Also, install a check to prevent people
from trying COPY BINARY to stdout/from stdin.  No way that will
work unless we redesign the frontend COPY protocol ... which is
not worth the trouble in the near future ...
2000-05-18 01:52:45 +00:00
Bruce Momjian 362a0f68d9 The check of class string in configure (line 1732) fails because this class
is in <string> and not in <string.h> on QNX4/egcs-2.91.60.
Probably this can be changed for all platforms. The test in line 1705 uses
<string> as well. Because I am not sure, I havn't this included into the
patch.

doc/Makefile has to be sligthly  modified as it has been done for
src/backend/Makefile due to a QNX4 problem (patch attached)

Furthermore src/test/regress/run_check.sh needs to be patched as it has been
done for regress.sh (patch attached). Please note that in the patch the
postmaster is started always with the -i option.

run_check.sh reports the test "limit" as failed, but in reallity it is OK.
regress.sh reports it as OK.

Andreas Kardos
2000-05-17 16:57:41 +00:00
Bruce Momjian a8020a78ec Back out odbc changes until 7.1. 2000-05-17 15:36:37 +00:00
Michael Meskes e39a118694 *** empty log message *** 2000-05-17 06:03:14 +00:00
Bruce Momjian a47e20b049 Several compilation and run-time problems occur when building on SGI
IRIX systems using the native compilers.  A summary is:
- Various files use "//" as a comment delimiter in c files.
- Problems caused by assuming "char" is signed.
  cash.in: building -signed the rules regression test fails as described
    in FAQ_QNX4.  If CHAR_MAX is "255U" then ((signed char)CHAR_MAX) is -1.
  postmaster.c: random number regression test failed without this change.
- Some generic build issues and warning message cleanup.

David Kaelbling
2000-05-16 20:48:52 +00:00
Tom Lane 6dd06737ba Remove configure check for how to abbreviate 'tr A-Z a-z', and instead
just use the portable form,
tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
There were a bunch of places that weren't paying attention to configure's
result anyway (including configure itself!?); clean them up too.
2000-05-16 02:14:15 +00:00
Peter Mount 33bb1aee91 Fixed the message Makefile produces after compiling. It still said
about the old Driver class, not the new package. Spotted by
Joseph Shraibman <jks@p1.selectacast.net>
2000-05-15 21:32:51 +00:00