aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/copy.c
Commit message (Collapse)AuthorAge
...
* Add system indexes to match all caches.Bruce Momjian1999-11-22
| | | | | | | 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.
* Change backend-side COPY to write files with permissions 644 not 666Tom Lane1999-11-21
| | | | | | | | | (whoever thought world-writable files were a good default????). Modify the pg_pwd code so that pg_pwd is created with 600 permissions. Modify initdb so that permissions on a pre-existing PGDATA directory are not blindly accepted: if the dir is already there, it does chmod go-rwx to be sure that the permissions are OK and the dir actually is owned by postgres.
* Cancel query support from MassimoBruce Momjian1999-09-27
|
* Mega-commit to make heap_open/heap_openr/heap_close take anTom Lane1999-09-18
| | | | | | | | | | | | | | | | | 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.
* Eliminate query length limitation imposed by pg_client_to_serverTom Lane1999-09-11
| | | | | and pg_server_to_client. Eliminate copy.c's restriction on the length of a single attribute.
* Plug several holes in backend's ability to cope withTom Lane1999-07-22
| | | | unexpected loss of connection to frontend.
* Move some system includes into c.h, and remove duplicates.Bruce Momjian1999-07-17
|
* Final cleanup.Bruce Momjian1999-07-16
|
* Change #include's to use <> and "" as appropriate.Bruce Momjian1999-07-15
|
* Remove unused #includes in *.c files.Bruce Momjian1999-07-15
|
* Fix to prevent too large tuple from being created.Bruce Momjian1999-07-03
|
* Fix critical error noticed by Massimo: copy.c used to have aTom Lane1999-06-12
| | | | | | | | | special hack to ensure it would close its output file even after failure due to elog(ERROR) partway through the copy. This is now unnecessary because fd.c takes care of cleaning up open files at transaction abort; worse, after fd.c closed the file copy.c would try to do so *again* at the start of the next COPY command. This would result in havoc in most implementations of stdio library.
* 1. Run all pg_dump queries in single serializable transaction.Vadim B. Mikheev1999-05-29
| | | | | | 2. Get rid of locking when updating statistics in vacuum. 3. Use QuerySnapshot in COPY TO and call SetQuerySnashot in main tcop loop before FETCH and COPY TO.
* Make functions static or NOT_USED as appropriate.Bruce Momjian1999-05-26
|
* pgindent run over code.Bruce Momjian1999-05-25
|
* Change error messages to oids come out as %u and not %d. Change has noBruce Momjian1999-05-10
| | | | real affect now.
* here are some patches for 6.5.0 which I already submitted but have neverBruce Momjian1999-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | been applied. The patches are in the .tar.gz attachment at the end: varchar-array.patch this patch adds support for arrays of bpchar() and varchar(), which where always missing from postgres. These datatypes can be used to replace the _char4, _char8, etc., which were dropped some time ago. block-size.patch this patch fixes many errors in the parser and other program which happen with very large query statements (> 8K) when using a page size larger than 8192. This patch is needed if you want to submit queries larger than 8K. Postgres supports tuples up to 32K but you can't insert them because you can't submit queries larger than 8K. My patch fixes this problem. The patch also replaces all the occurrences of `8192' and `1<<13' in the sources with the proper constants defined in include files. You should now never find 8192 hardwired in C code, just to make code clearer. -- Massimo Dal Zotto
* Revise backend libpq interfaces so that messages to the frontendTom Lane1999-04-25
| | | | | | can be generated in a buffer and then sent to the frontend in a single libpq call. This solves problems with NOTICE and ERROR messages generated in the middle of a data message or COPY OUT operation.
* Change my-function-name-- to my_function_name, and optimizer renames.Bruce Momjian1999-02-13
|
* Changed ExecConstraints() and ExecRelCheck() to cache the constraintsJan Wieck1999-02-07
| | | | | | | | | qualification expression trees in the execution state. Prevents from memory exhaustion on INSERT, UPDATE or COPY to tables that have CHECK constraints. Speedup against the variant using freeObject() is more than factor 2. Jan
* Cleanup of source files where 'return' or 'var =' is alone on a line.Bruce Momjian1999-02-03
|
* Add TEMP tables/indexes. Add COPY pfree(). Other cleanups.Bruce Momjian1999-02-02
|
* Fixed growing of backend due to not pfree()'d data on COPY FROMJan Wieck1999-02-01
| | | | | | | Fixed growing of backend if BEFORE DELETE trigger returns heap tuple different from trigtuple. Jan
* Add explicit buffering in backend libpq, to compensate forTom Lane1999-01-23
| | | | buffering lost by not going through stdio anymore for client I/O.
* Apply Win32 patch from Horak Daniel.Bruce Momjian1999-01-17
|
* From: Magnus Hagander <mha@sollentuna.net>Marc G. Fournier1999-01-11
| | | | | | | | | | | | Here is a first patch to cleanup the backend side of libpq. This patch removes all external dependencies on the "Pfin" and "Pfout" that are declared in pqcomm.h. These variables are also changed to "static" to make sure. Almost all the change is in the handler of the "copy" command - most other areas of the backend already used the correct functions. This change will make the way for cleanup of the internal stuff there - now that all the functions accessing the file descriptors are confined to a single directory.
* Initial MVCC code.Vadim B. Mikheev1998-12-15
| | | | New code for locking buffer' context.
* New HeapTuple structure/interface.Vadim B. Mikheev1998-11-27
|
* Get rid of some minor compiler warnings.Tom Lane1998-10-26
| | | | | (HP's cc doesn't like if you forward-declare a routine static, and then don't make it static in the actual definition...)
* Allow 8-key indexes.Bruce Momjian1998-09-23
|
* AIX align fix.Bruce Momjian1998-09-08
|
* Alignment cleanup so no more massive switch statements for alignment,Bruce Momjian1998-09-07
| | | | just two macros.
* OK, folks, here is the pgindent output.Bruce Momjian1998-09-01
|
* Renaming cleanup, no pgindent yet.Bruce Momjian1998-09-01
|
* Prevent file descriptor leak from failed COPY.Bruce Momjian1998-08-29
|
* Fix scanner name length trimming.Bruce Momjian1998-08-29
|
* This is the first (of hopefully few) AIX port patches. This patchBruce Momjian1998-08-29
| | | | | | | was tested with Linux/GCC. I still have some issues with with the snprintf() function. David Hartwig
* o note that now pg_database has a new attribuite "encoding" evenBruce Momjian1998-08-24
| | | | | | | | | | | | | | | | | | | | | | if MULTIBYTE is not enabled. So be sure to run initdb. o these patches are made against the latest source tree (after Bruce's massive patch, I think) BTW, I noticed that after running regression, the oid field of pg_type seems disappeared. regression=> select oid from pg_type; ERROR: attribute 'oid' not found this happens after the constraints test. This occures with/without my patches. strange... o pg_database_mb.h, pg_class_mb.h, pg_attribute_mb.h are no longer used, and shoud be removed. o GetDatabaseInfo() in utils/misc/database.c removed (actually in #ifdef 0). seems nobody uses. t-ishii@sra.co.jp
* heap_fetch requires buffer pointer, must be released; heap_getnextBruce Momjian1998-08-19
| | | | | | | | | | | | | 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;
* Use Snapshot in heap access methods.Vadim B. Mikheev1998-07-27
|
* From: t-ishii@sra.co.jpMarc G. Fournier1998-07-26
| | | | | | | | | As Bruce mentioned, this is due to the conflict among changes we made. Included patches should fix the problem(I changed all MB to MULTIBYTE). Please let me know if you have further problem. P.S. I did not include pathces to configure and gram.c to save the file size(configure.in and gram.y modified).
* I really hope that I haven't missed anything in this one...Marc G. Fournier1998-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: t-ishii@sra.co.jp Attached are patches to enhance the multi-byte support. (patches are against 7/18 snapshot) * determine encoding at initdb/createdb rather than compile time Now initdb/createdb has an option to specify the encoding. Also, I modified the syntax of CREATE DATABASE to accept encoding option. See README.mb for more details. For this purpose I have added new column "encoding" to pg_database. Also pg_attribute and pg_class are changed to catch up the modification to pg_database. Actually I haved added pg_database_mb.h, pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is enabled. The reason having separate files is I couldn't find a way to use ifdef or whatever in those files. I have to admit it looks ugly. No way. * support for PGCLIENTENCODING when issuing COPY command commands/copy.c modified. * support for SQL92 syntax "SET NAMES" See gram.y. * support for LATIN2-5 * add UNICODE regression test case * new test suite for MB New directory test/mb added. * clean up source files Basic idea is to have MB's own subdirectory for easier maintenance. These are include/mb and backend/utils/mb.
* Fix for COPY problem and atttypmod.Bruce Momjian1998-07-15
|
* Change atttypmod from int16 to int32, for Thomas.Bruce Momjian1998-07-12
|
* From: t-ishii@sra.co.jpMarc G. Fournier1998-06-19
| | | | | | | | | | | | | | | | | | | As mentioned around line 1153 in backend/commands/copy.c, the method of array checking is not perfect. test=> create table t1 (i text); test=> insert into t1 values('{\\.}'); INSERT 2645600 1 test=> select * from t1; i ----- {\\.} (2 rows) test=> copy t1 to '/tmp/aaa'; test=> copy t1 from '/tmp/aaa'; ERROR: CopyReadAttribute - end of record marker corrupted Copy cannot read data produced by itself!
* Remove un-needed braces around single statements.Bruce Momjian1998-06-15
|
* There's a patch attached to fix gcc 2.8.x warnings, except for theBruce Momjian1998-03-30
| | | | | | | | | | | | | | | | | | | | | | | | yyerror ones from bison. It also includes a few 'enhancements' to the C programming style (which are, of course, personal). The other patch removes the compilation of backend/lib/qsort.c, as qsort() is a standard function in stdlib.h and can be used any where else (and it is). It was only used in backend/optimizer/geqo/geqo_pool.c, backend/optimizer/path/predmig.c, and backend/storage/page/bufpage.c > > Some or all of these changes might not be appropriate for v6.3, since we > > are in beta testing and since they do not affect the current functionality. > > For those cases, how about submitting patches based on the final v6.3 > > release? There's more to come. Please review these patches. I ran the regression tests and they only failed where this was expected (random, geo, etc). Cheers, Jeroen
* pgindent run before 6.3 release, with Thomas' requested changes.Bruce Momjian1998-02-26
|
* From: Jan Wieck <jwieck@debis.com>Marc G. Fournier1998-02-25
| | | | | | | | | | seems that my last post didn't make it through. That's good since the diff itself didn't covered the renaming of pg_user.h to pg_shadow.h and it's new content. Here it's again. The complete regression test passwd with only some float diffs. createuser and destroyuser work. pg_shadow cannot be read by ordinary user.
* Atttypmod cleanup.Bruce Momjian1998-02-13
|