summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/sets.c
AgeCommit message (Collapse)Author
2004-04-01Replace TupleTableSlot convention for whole-row variables and functionTom Lane
results with tuples as ordinary varlena Datums. This commit does not in itself do much for us, except eliminate the horrid memory leak associated with evaluation of whole-row variables. However, it lays the groundwork for allowing composite types as table columns, and perhaps some other useful features as well. Per my proposal of a few days ago.
2004-01-06Apply the core parts of Dennis Bjorklund's patch to allow functionTom Lane
parameters to be declared with names. pg_proc has a column to store names, and CREATE FUNCTION can insert data into it, but that's all as yet. I need to do more work on the pg_dump and plpgsql portions of the patch before committing those, but I thought I'd get the bulky changes in before the tree drifts under me. initdb forced due to pg_proc change.
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-09-15OK, some of these syntax errors should be given other codes.Peter Eisentraut
2003-09-09Some "feature not supported" errors are better syntax errors, because thePeter Eisentraut
feature they complain about isn't a feature or cannot be implemented without definitional changes.
2003-08-04Update copyrights to 2003.Bruce Momjian
2003-08-04pgindent run.Bruce Momjian
2003-07-27Error message editing in utils/adt. Again thanks to Joe Conway for doingTom Lane
the bulk of the heavy lifting ...
2002-12-13Phase 3 of read-only-plans project: ExecInitExpr now builds expressionTom Lane
execution state trees, and ExecEvalExpr takes an expression state tree not an expression plan tree. The plan tree is now read-only as far as the executor is concerned. Next step is to begin actually exploiting this property.
2002-09-04pgindent run.Bruce Momjian
2002-09-02Code review for HeapTupleHeader changes. Add version number to page headersTom Lane
(overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask, per earlier discussion. Simplify scheme for overlaying fields in tuple header (no need for cmax to live in more than one place). Don't try to clear infomask status bits in tqual.c --- not safe to do it there. Don't try to force output table of a SELECT INTO to have OIDs, either. Get rid of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which has already caused one recent failure. Improve documentation.
2002-08-27This patches replaces a few more usages of strcpy() and sprintf() whenBruce Momjian
copying into a fixed-size buffer (in this case, a buffer of NAMEDATALEN bytes). AFAICT nothing to worry about here, but worth fixing anyway... Neil Conway
2002-08-09has_table_privilege spawns scions has_database_privilege, ↵Tom Lane
has_function_privilege, has_language_privilege, has_schema_privilege to let SQL queries test all the new privilege types in 7.3. Also, add functions pg_table_is_visible, pg_type_is_visible, pg_function_is_visible, pg_operator_is_visible, pg_opclass_is_visible to test whether objects contained in schemas are visible in the current search path. Do some minor cleanup to centralize accesses to pg_database, as well.
2002-08-05Restructure system-catalog index updating logic. Instead of havingTom Lane
hardwired lists of index names for each catalog, use the relcache's mechanism for caching lists of OIDs of indexes of any table. This reduces the common case of updating system catalog indexes to a single line, makes it much easier to add a new system index (in fact, you can now do so on-the-fly if you want to), and as a nice side benefit improves performance a little. Per recent pghackers discussion.
2002-07-24Remove unused system table columns:Peter Eisentraut
pg_language.lancompiler pg_operator.oprprec pg_operator.oprisleft pg_proc.proimplicit pg_proc.probyte_pct pg_proc.properbyte_cpu pg_proc.propercall_cpu pg_proc.prooutin_ratio pg_shadow.usetrace pg_type.typprtlen pg_type.typreceive pg_type.typsend Attempts to use the obsoleted attributes of pg_operator or pg_proc in the CREATE commands will be greeted by a warning. For pg_type, there is no warning (yet) because pg_dump scripts still contain these attributes. Also remove new but already obsolete spellings isVolatile, isStable, isImmutable in WITH clause. (Use new syntax instead.)
2002-07-20oid is needed, it is added at the end of the struct (after the nullBruce Momjian
bitmap, if present). Per Tom Lane's suggestion the information whether a tuple has an oid or not is carried in the tuple descriptor. For debugging reasons tdhasoid is of type char, not bool. There are predefined values for WITHOID, WITHOUTOID and UNDEFOID. This patch has been generated against a cvs snapshot from last week and I don't expect it to apply cleanly to current sources. While I post it here for public review, I'm working on a new version against a current snapshot. (There's been heavy activity recently; hope to catch up some day ...) This is a long patch; if it is too hard to swallow, I can provide it in smaller pieces: Part 1: Accessor macros Part 2: tdhasoid in TupDesc Part 3: Regression test Part 4: Parameter withoid to heap_addheader Part 5: Eliminate t_oid from HeapTupleHeader Part 2 is the most hairy part because of changes in the executor and even in the parser; the other parts are straightforward. Up to part 4 the patched postmaster stays binary compatible to databases created with an unpatched version. Part 5 is small (100 lines) and finally breaks compatibility. Manfred Koizar
2002-07-18pg_cast table, and standards-compliant CREATE/DROP CAST commands, plusPeter Eisentraut
extension to create binary compatible casts. Includes dependency tracking as well. pg_proc.proimplicit is now defunct, but will be removed in a separate commit. pg_dump provides a migration path from the previous scheme to declare casts. Dumping binary compatible casts is currently impossible, though.
2002-06-20Update copyright to 2002.Bruce Momjian
2002-05-22Add optional "validator" function to languages that can validate thePeter Eisentraut
function body (and other properties) as a function in the language is created. This generalizes ad hoc code that already existed for the built-in languages. The validation now happens after the pg_proc tuple of the new function is created, so it is possible to define recursive SQL functions. Add some regression test cases that cover bogus function definition attempts.
2002-05-18Allow functions to be executed with the privileges of the function owner.Peter Eisentraut
I took the opportunity to remove the pg_proc.proistrusted field.
2002-04-11Restructure representation of aggregate functions so that they have pg_procTom Lane
entries, per pghackers discussion. This fixes aggregates to live in namespaces, and also simplifies/speeds up lookup in parse_func.c. Also, add a 'proimplicit' flag to pg_proc that controls whether a type coercion function may be invoked implicitly, or only explicitly. The current settings of these flags are more permissive than I would like, but we will need to debate and refine the behavior; for now, I avoided breaking regression tests as much as I could.
2002-04-05Divide functions into three volatility classes (immutable, stable, andTom Lane
volatile), rather than the old cachable/noncachable distinction. This allows indexscan optimizations in many places where we formerly didn't. Also, add a pronamespace column to pg_proc (it doesn't do anything yet, however).
2002-03-29pg_type has a typnamespace column; system now supports creating typesTom Lane
in different namespaces. Also, cleanup work on relation namespace support: drop, alter, rename commands work for tables in non-default namespaces.
2002-02-18Privileges on functions and procedural languagesPeter Eisentraut
2001-10-02Add CREATE OR REPLACE FUNCTION syntax to allow replacing a functionTom Lane
definition without changing the function's OID, thereby not breaking rules, views, triggers, etc that depend on it. From Gavin Sherry.
2001-09-08Clean up some confusion about where and how to set whereToSendOutput.Tom Lane
We will no longer try to send elog messages to the client before we have initialized backend libpq (oops); however, reporting bogus commandline switches via elog does work now (not irrelevant, because of PGOPTIONS). Fix problem with inappropriate sending of checkpoint-process messages to stderr.
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2001-01-24Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian
2001-01-23Fix all the places that called heap_update() and heap_delete() withoutTom Lane
bothering to check the return value --- which meant that in case the update or delete failed because of a concurrent update, you'd not find out about it, except by observing later that the transaction produced the wrong outcome. There are now subroutines simple_heap_update and simple_heap_delete that should be used anyplace that you're not prepared to do the full nine yards of coping with concurrent updates. In practice, that seems to mean absolutely everywhere but the executor, because *noplace* else was checking.
2000-11-16Change SearchSysCache coding conventions so that a reference count isTom Lane
maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
2000-08-24SQL-language functions are now callable in ordinary fmgr contexts ...Tom Lane
for example, an SQL function can be used in a functional index. (I make no promises about speed, but it'll work ;-).) Clean up and simplify handling of functions returning sets.
2000-06-09Another round of updates for new fmgr, mostly in the datetime code.Tom Lane
2000-05-28First round of changes for new fmgr interface. fmgr itself and theTom Lane
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-01-26Add:Bruce Momjian
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
2000-01-17setheapoverride() is history. Uses replaced with CommandCounterIncrement()Tom Lane
where necessary --- several of them didn't really need it, though. tqual-checking macros simplified accordingly.
1999-11-24Rename heap_replace to heap_update.Bruce Momjian
1999-11-22Add system indexes to match all caches.Bruce Momjian
Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
1999-09-18Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane
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-07-17 Move some system includes into c.h, and remove duplicates.Bruce Momjian
1999-07-16Final cleanup.Bruce Momjian
1999-07-16Update #include cleanupsBruce Momjian
1999-07-15Remove unused #includes in *.c files.Bruce Momjian
1999-02-13Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian
1998-12-15Initial MVCC code.Vadim B. Mikheev
New code for locking buffer' context.
1998-11-27New HeapTuple structure/interface.Vadim B. Mikheev
1998-09-01OK, folks, here is the pgindent output.Bruce Momjian
1998-09-01Renaming cleanup, no pgindent yet.Bruce Momjian
1998-08-19heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian
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-07-27Use Snapshot in heap access methods.Vadim B. Mikheev
1998-07-20Cleanup use of 16 that should be NAMEDATALEN.Bruce Momjian