summaryrefslogtreecommitdiff
path: root/src/backend/utils
AgeCommit message (Collapse)Author
2002-08-02ALTER TABLE DROP COLUMN works. Patch by Christopher Kings-Lynne,Tom Lane
code review by Tom Lane. Remaining issues: functions that take or return tuple types are likely to break if one drops (or adds!) a column in the table defining the type. Need to think about what to do here. Along the way: some code review for recent COPY changes; mark system columns attnotnull = true where appropriate, per discussion a month ago.
2002-07-31Instead of having a configure-time DEFAULT_ATTSTATTARGET, store -1 inTom Lane
attstattarget to indicate 'use the default'. The default is now a GUC variable default_statistics_target, and so may be changed on the fly. Along the way we gain the ability to have pg_dump dump the per-column statistics target when it's not the default. Patch by Neil Conway, with some kibitzing from Tom Lane.
2002-07-31Rename pid function to backend_pid().Bruce Momjian
2002-07-31Add function to access backend pid, pg_stat_get_backend_mypid.Bruce Momjian
2002-07-30 This should fix a bug where a row that was updated orBruce Momjian
deleted that had another row inserted/updated to its old value during the same statement or other statements before the integrity check for noaction would incorrectly error. This could happen in deferred constraints or due to triggers or functions. It's effectively a reworking of the previous patch that did a not exists to instead do a separate check. Stephan Szabo
2002-07-30Since we're depending on %option noyywrap in the main scanner now,Tom Lane
we may as well use it in all our flex files. Make all the flex files have a consistent set of options.
2002-07-30Here are two patches. The guc_and_tablefunc patch addresses the twoBruce Momjian
changes mentioned above, and also adds a new function to the tablefunc API. The tablefunc API change adds the following function: * Oid foidGetTypeId(Oid foid) - Get a function's typeid given the * function Oid. Use this together with TypeGetTupleDesc() to get a * TupleDesc which is derived from the function's declared return type. In the next post I'll send the contrib/tablefunc patch, which illustrates the usage of this new function. Also attached is a doc patch for this change. The doc patch also adds a function that I failed to document previously. Joe Conway
2002-07-30This patch fixes one serious bug (runaway INSERT) and a few rare (andBruce Momjian
hard to reproduce) error conditions. Manfred Koizar
2002-07-30--enable-syslog no longer required to use syslog.Bruce Momjian
2002-07-29Implement CREATE/DROP OPERATOR CLASS. Work still remains: need moreTom Lane
documentation (xindex.sgml should be rewritten), need to teach pg_dump about it, need to update contrib modules that currently build pg_opclass entries by hand. Original patch by Bill Studenmund, grammar adjustments and general update for 7.3 by Tom Lane.
2002-07-25Implement DROP CONVERSIONTatsuo Ishii
Add regression test
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-24Add Japanese README explaining how to add new conversion.Tatsuo Ishii
English README will come soon...
2002-07-20Code review for SHOW output changes; fix horology expected files forTom Lane
new SHOW output format.
2002-07-20Fix problems caused by code drift of API for without-oids.Bruce Momjian
2002-07-20> 2. This patch includes the same Table Function API fixes that IBruce Momjian
> submitted on July 9: > > http://archives.postgresql.org/pgsql-patches/2002-07/msg00056.php > > Please disregard that one *if* this one is applied. If this one is > rejected please go ahead with the July 9th patch. The July 9th Table Function API patch mentioned above is now in CVS, so here is an updated version of the guc patch which should apply cleanly against CVS tip. Joe Conway
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-20This patch fixes a regression caused by my recent changes to heapBruce Momjian
tuple header. The fix is based on the thought that HEAP_MOVED_IN is not needed any more as soon as HEAP_XMIN_COMMITTED has been set. So in tqual.c and vacuum.c the HEAP_MOVED bits are cleared when HEAP_XMIN_COMMITTED is set. Vacuum robustness is enhanced by rearranging ifs, so that we have a chance to elog(ERROR, ...) before an assertion fails. A new regression test is included. Manfred Koizar
2002-07-19Oops. Too much ifdef out.Tatsuo Ishii
2002-07-19Temporary ifdef out migrating functions to avoid compiler warnings.Tatsuo Ishii
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-07-18Create directory before installing files.Peter Eisentraut
2002-07-18Back out BETWEEN node patch, was causing initdb failure.Bruce Momjian
2002-07-18Finished the Between patch Christopher started.Bruce Momjian
Implements between (symmetric / asymmetric) as a node. Executes the left or right expression once, makes a Const out of the resulting Datum and executes the >=, <= portions out of the Const sets. Of course, the parser does a fair amount of preparatory work for this to happen. Rod Taylor
2002-07-18Here is a patch for the Table Function API. It fixes a bug found by NeilBruce Momjian
Conway (BuildTupleFromCStrings sets NULL for pass-by-value types when intended value is 0). It also implements some other improvements suggested by Neil. Joe Conway
2002-07-18I have committed many support files for CREATE CONVERSION. DefaultTatsuo Ishii
conversion procs and conversions are added in initdb. Currently supported conversions are: UTF-8(UNICODE) <--> SQL_ASCII, ISO-8859-1 to 16, EUC_JP, EUC_KR, EUC_CN, EUC_TW, SJIS, BIG5, GBK, GB18030, UHC, JOHAB, TCVN EUC_JP <--> SJIS EUC_TW <--> BIG5 MULE_INTERNAL <--> EUC_JP, SJIS, EUC_TW, BIG5 Note that initial contents of pg_conversion system catalog are created in the initdb process. So doing initdb required is ideal, it's possible to add them to your databases by hand, however. To accomplish this: psql -f your_postgresql_install_path/share/conversion_create.sql your_database So I did not bump up the version in cataversion.h. TODO: Add more conversion procs Add [CASCADE|RESTRICT] to DROP CONVERSION Add tuples to pg_depend Add regression tests Write docs Add SQL99 CONVERT command? -- Tatsuo Ishii
2002-07-16Oops, sometimes strtol isn't called in pg_atoi, so we do need that badpBruce Momjian
check.
2002-07-16Fix tid to in/out as unsigned.Bruce Momjian
2002-07-16Add conversion procs for CREATE CONVERSIONTatsuo Ishii
2002-07-16Mark 'line' as 'not implemented' in SGML and psql \dT, per ThomasBruce Momjian
Lockhart. initdb not forced.
2002-07-15Improve relcache.c error reporting for the next guy who has to debugBruce Momjian
this thing.
2002-07-13Add SET statement_timeout capability. Timeout is in ms. A value ofBruce Momjian
zero turns off the timer.
2002-07-12Second phase of committing Rod Taylor's pg_depend/pg_constraint patch.Tom Lane
pg_relcheck is gone; CHECK, UNIQUE, PRIMARY KEY, and FOREIGN KEY constraints all have real live entries in pg_constraint. pg_depend exists, and RESTRICT/CASCADE options work on most kinds of DROP; however, pg_depend is not yet very well populated with dependencies. (Most of the ones that are present at this point just replace formerly hardwired associations, such as the implicit drop of a relation's pg_type entry when the relation is dropped.) Need to add more logic to create dependency entries, improve pg_dump to dump constraints in place of indexes and triggers, and add some regression tests.
2002-07-11Add new CREATE CONVERSION/DROP CONVERSION command.Tatsuo Ishii
This is the first cut toward CREATE CONVERSION/DROP CONVERSION implementaion. The commands can now add/remove tuples to the new pg_conversion system catalog, but that's all. Still need work to make them actually working. Documentations, regression tests also need work.
2002-07-06I've fixed up the way domain constraints (not null and type length)Bruce Momjian
are managed as per request. Moved from merging with table attributes to applying themselves during coerce_type() and coerce_type_typmod. Regression tests altered to test the cast() scenarios. Rod Taylor
2002-07-04Implement the IS DISTINCT FROM operator per SQL99.Thomas G. Lockhart
Reused the Expr node to hold DISTINCT which strongly resembles the existing OP info. Define DISTINCT_EXPR which strongly resembles the existing OPER_EXPR opType, but with handling for NULLs required by SQL99. We have explicit support for single-element DISTINCT comparisons all the way through to the executor. But, multi-element DISTINCTs are handled by expanding into a comparison tree in gram.y as is done for other row comparisons. Per discussions, it might be desirable to move this into one or more purpose-built nodes to be handled in the backend. Define the optional ROW keyword and token per SQL99. This allows single-element row constructs, which were formerly disallowed due to shift/reduce conflicts with parenthesized a_expr clauses. Define the SQL99 TREAT() function. Currently, use as a synonym for CAST().
2002-06-21Remove Jan's copyright, with his approval.Bruce Momjian
2002-06-20Clean up some copyrights.Bruce Momjian
2002-06-20Add missing SRF file.Bruce Momjian
2002-06-20Update copyright to 2002.Bruce Momjian
2002-06-20Here is a patch for Composite and Set returning function support. I madeBruce Momjian
two small changes to the API since last patch, which hopefully completes the decoupling of composite function support from SRF specific support. Joe Conway
2002-06-17Merge ALTER GROUP ADD/DROP rules by creating add_drop action.Bruce Momjian
2002-06-16Remove KSQO from GUC and move file to _deadcode.Bruce Momjian
2002-06-15Patch for current_schemas to optionally include implicit ...Bruce Momjian
Second cut attached. This one just adds a boolean option to the existing function to indicate that implicit schemas are to be included (or not). I remembered the docs as well this time :-) Dave Page
2002-06-15This patch wraps all accesses to t_xmin, t_cmin, t_xmax, and t_cmax inBruce Momjian
HeapTupleHeaderData in setter and getter macros called HeapTupleHeaderGetXmin, HeapTupleHeaderSetXmin etc. It also introduces a "virtual" field xvac by defining HeapTupleHeaderGetXvac and HeapTupleHeaderSetXvac. Xvac is used by VACUUM, in fact it is stored in t_cmin. Manfred Koizar
2002-06-15The macaddr datatype understands most formats of MAC address, except 12Bruce Momjian
hex digits with no separators, eg 00AABBCCDDEE. This is easily remedied with the following patch (against 7.2.1): Mike Wyer
2002-06-15Search the existing regular expression cache as a ring buffer.Thomas G. Lockhart
Will optimize the case for repeated calls for the same expression, which seems to be the most common case. Formerly, always searched from the first entry. May want to look at the least-recently-used algorithm to make sure it is identifying the right slots to reclaim. Seems silly to do math when it seems that we could simply use an incrementing counter...
2002-06-15Make encryption of stored passwords the default, as discussed months ago.Bruce Momjian
2002-06-14Add support for GB18030Tatsuo Ishii
2002-06-13Add GB18030 support. Contributed by Bill Huang <bill_huanghb@ybb.ne.jp>Tatsuo Ishii
(ODBC support has not been committed yet. left for Hiroshi...)