Commit Graph

259 Commits

Author SHA1 Message Date
Tom Lane 1f5cc8c78a Remove VARLENA_FIXED_SIZE hack, which is irreversibly broken now that
both MULTIBYTE and TOAST prevent char(n) from being truly fixed-size.
Simplify and speed up fastgetattr() and index_getattr() macros by
eliminating special cases for attnum=1.  It's just as fast to handle
the first attribute by presetting its attcacheoff to zero; so do that
instead when loading the tupledesc in relcache.c.
2000-11-30 18:38:47 +00:00
Peter Eisentraut a70e74b060 Put external declarations into header files. 2000-11-21 21:16:06 +00:00
Tom Lane 21e1e6643c Minor cleanup of tableOid-related coding. 2000-11-14 21:04:32 +00:00
Tom Lane 61aca818c4 Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.
These two routines will now ALWAYS elog() on failure, whether you ask for
a lock or not.  If you really want to get a NULL return on failure, call
the new routines heap_open_nofail()/heap_openr_nofail().  By my count there
are only about three places that actually want that behavior.  There were
rather more than three places that were missing the check they needed to
make under the old convention :-(.
2000-08-03 19:19:38 +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 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 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
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Peter Eisentraut fa5400c0a4 added ALTER TABLE DROP COLUMN, early version 2000-01-22 14:20:56 +00:00
Jan Wieck 397e9b32a3 Some changes to prepare for LONG attributes.
Jan
1999-12-16 22:20:03 +00:00
Bruce Momjian bb10bf319e Rename heap_replace to heap_update. 1999-11-24 00:44:37 +00:00
Hiroshi Inoue 05d13cad28 The 1st step to implement new type of scan,TidScan.
Now WHERE restriction on ctid is allowed though it is
sequentially scanned.
1999-10-11 06:28:29 +00:00
Tom Lane bd272cace6 Mega-commit to make heap_open/heap_openr/heap_close take an
additional argument specifying the kind of lock to acquire/release (or
'NoLock' to do no lock processing).  Ensure that all relations are locked
with some appropriate lock level before being examined --- this ensures
that relevant shared-inval messages have been processed and should prevent
problems caused by concurrent VACUUM.  Fix several bugs having to do with
mismatched increment/decrement of relation ref count and mismatched
heap_open/close (which amounts to the same thing).  A bogus ref count on
a relation doesn't matter much *unless* a SI Inval message happens to
arrive at the wrong time, which is probably why we got away with this
sloppiness for so long.  Repair missing grab of AccessExclusiveLock in
DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi.
Recommend 'make clean all' after pulling this update; I modified the
Relation struct layout slightly.
Will post further discussion to pghackers list shortly.
1999-09-18 19:08:25 +00:00
Bruce Momjian 773088809d More cleanup 1999-07-16 17:07:40 +00:00
Bruce Momjian 4b2c2850bf Clean up #include in /include directory. Add scripts for checking includes. 1999-07-15 15:21:54 +00:00
Tom Lane ebc3cc7efa heapam.h uses type time_t, but didn't include <time.h>. 1999-07-10 22:06:26 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Bruce Momjian 6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
Vadim B. Mikheev 3f7fbf85dc Initial MVCC code.
New code for locking buffer' context.
1998-12-15 12:47:01 +00:00
Vadim B. Mikheev 2435c7d501 New HeapTuple structure/interface. 1998-11-27 19:33:35 +00:00
Bruce Momjian 173c555948 Make functions static or ifdef NOT_USED. Prevent pg_version creation. 1998-10-08 18:30:52 +00:00
Bruce Momjian fa1a8d6a97 OK, folks, here is the pgindent output. 1998-09-01 04:40:42 +00:00
Bruce Momjian af74855a60 Renaming cleanup, no pgindent yet. 1998-09-01 03:29:17 +00:00
Bruce Momjian 7971539020 heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan;
	descriptor; bootstrap can create multi-key indexes;
pg_procname index now is multi-key index; oidint2, oidint4, oidname
are gone (must be removed from regression tests); use System Cache
rather than sequential scan in many places; heap_modifytuple no
longer takes buffer parameter; remove unused buffer parameter in
a few other functions; oid8 is not index-able; remove some use of
single-character variable names; cleanup Buffer variables usage
and scan descriptor looping; cleaned up allocation and freeing of
tuples; 18k lines of diff;
1998-08-19 02:04:17 +00:00
Vadim B. Mikheev be8300b18f Use Snapshot in heap access methods. 1998-07-27 19:38:40 +00:00
Bruce Momjian 27db9ecd0b Fix macros that were not properly surrounded by parens or braces. 1998-06-15 18:40:05 +00:00
Bruce Momjian b52c666a99 Make new DISABLE_COMPLEX_MACRO for compilers that can't handle our
macros.
1998-06-14 01:34:07 +00:00
Marc G. Fournier 56b3182241 From: "Billy G. Allie" <Bill.Allie@mug.org>
The following patches will allow postgreSQL 6.3 to compile and run on a
UNIXWARE 2.1.2 system with the native C compiler with the following library
change:

        The alloca function must be copied from the libucb.a archive and added
        to the libgen.a archive.

Also, the GNU flex program is needed to successfully build postgreSQL.
1998-03-01 04:47:38 +00:00
Bruce Momjian a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
Bruce Momjian ec9d5d71ec Update now that attcacheoff initial value is -1 always. 1998-02-06 20:18:01 +00:00
Bruce Momjian d8ddb10f51 Reduce size of inlining. 1998-02-01 05:38:40 +00:00
Bruce Momjian 726c3854cb Inline fastgetattr and others so data access does not use function
calls.
1998-01-31 04:39:26 +00:00
Bruce Momjian 54399bb2f9 dummyret cleanup 1998-01-27 15:57:41 +00:00
Bruce Momjian b4564a98fa Deadlock ceallnup.
(void) change for aix and hp compilers.

protocol cleanup.
1998-01-27 15:35:30 +00:00
Marc G. Fournier fc75484550 Somehow the 'comment' here got messed up 1998-01-25 05:04:21 +00:00
Bruce Momjian 7229513943 Fix prototypes so they don't look like function definitions. 1998-01-24 22:50:57 +00:00
Bruce Momjian e9e1ff226f Remove all time travel stuff. Small parser cleanup. 1997-11-20 23:24:03 +00:00
Vadim B. Mikheev 32cd09ac6d Good Bye, Time Travel! 1997-11-02 15:27:14 +00:00
Bruce Momjian 0308f91cd2 No more warnings on macros, thanks VAdim. 1997-10-30 23:37:01 +00:00
Bruce Momjian 0a3cee72ac Add mention of heap_getattr() compiler warning. 1997-09-14 03:59:44 +00:00
Bruce Momjian 7044dd7ec8 Fix heap_getattr bug I just added. 1997-09-12 14:29:04 +00:00
Bruce Momjian b6bd3da520 Macro cleanup of heap_getattr. 1997-09-12 05:58:18 +00:00
Bruce Momjian 1ea01720d5 heapattr functions now return a Datum, not char *. 1997-09-12 04:09:08 +00:00
Bruce Momjian 59f6a57e59 Used modified version of indent that understands over 100 typedefs. 1997-09-08 21:56:23 +00:00
Bruce Momjian 075cede748 Add typdefs to pgindent run. 1997-09-08 20:59:27 +00:00
Bruce Momjian 319dbfa736 Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
Bruce Momjian 1ccd423235 Massive commit to run PGINDENT on all *.c and *.h files. 1997-09-07 05:04:48 +00:00
Bruce Momjian 9fcd4c25bc Fix conditional casting. 1997-09-04 16:20:55 +00:00
Bruce Momjian e06099c607 heap_getattr fix for aix. 1997-08-29 00:44:55 +00:00
Vadim B. Mikheev 40ac5a692b heap_delete returns int now (for non-functional deletes). 1997-08-27 09:03:47 +00:00
Bruce Momjian 75c6c2b608 Inlined heap_getattr(). 1997-08-26 23:31:58 +00:00
Bruce Momjian 1d8bbfd2e7 Make functions static where possible, enclose unused functions in #ifdef NOT_USED. 1997-08-19 21:40:56 +00:00
Bruce Momjian aaeef4d17d All external function definitions now have prototypes that are checked. 1996-11-10 03:06:38 +00:00
Marc G. Fournier 9ec5e78613 And another one 1996-11-05 07:22:50 +00:00
Marc G. Fournier 0c960e7fc0 More include file cleanups 1996-11-03 08:17:38 +00:00
Marc G. Fournier 99412aef23 remove:
#include "postgres.h"
	#include "c.h"
1996-10-31 09:51:30 +00:00
Marc G. Fournier 3bf2b361f0 Date: Sun, 22 Sep 1996 13:47:39 -0400 (EDT)
From: Bruce Momjian <maillist@candle.pha.pa.us>
To: Postgres95-development <pg95-dev@ki.net>
Subject: [PG95-DEV] 2.0 patch for fastgetattr
1996-09-23 08:36:39 +00:00
Marc G. Fournier 5a8820efcd Moved from backend/access to include/access 1996-08-27 21:50:29 +00:00