summaryrefslogtreecommitdiff
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
* This is temporal place holder for Relation File Node tillVadim B. Mikheev2000-09-101-0/+14
| | | | reloid.version/unique_id file naming is not implemented
* Heap redo/undo (except for tuple moving used by vacuum).Vadim B. Mikheev2000-09-075-17/+41
|
* A bit of cleanup after SSL patch. Add it to config file, improvePeter Eisentraut2000-09-061-1/+2
| | | | documentation.
* Code cleanup of user name and user id handling in the backend. The currentPeter Eisentraut2000-09-064-16/+14
| | | | | | | | | | | user is now defined in terms of the user id, the user name is only computed upon request (for display purposes). This is kind of the opposite of the previous state, which would maintain the user name and compute the user id for permission checks. Besides perhaps saving a few cycles (integer vs string), this now creates a single point of attack for changing the user id during a connection, for purposes of "setuid" functions, etc.
* Added functionsJan Wieck2000-09-052-2/+11
| | | | | | | | | | | quote_ident(text) returns text quote_literal(text) returns text These are handy to build up properly quoted query strings for the new PL/pgSQL EXECUTE functionality to submit dynamic DDL statements. Jan
* Fix relative path references so that make knowns which dependencies referPeter Eisentraut2000-08-311-2/+2
| | | | | to one another. Sort out builddir vs srcdir variable namings. Remove some now obsoleted make variables.
* Revert removal of signed, volatile, and signal handler arg type tests.Peter Eisentraut2000-08-293-6/+26
|
* * to_char:Bruce Momjian2000-08-291-1/+4
| | | | | | | | | | | | | | | | | | | | | | | - full support for IW (ISO week) and vice versa conversion for IW too (the to_char 'week' support is now complete and I hope correct). Thomas, I use for IW code from timestamp.c, for this I create separate function date2isoweek() from original 'case DTK_WEEK:' code in the timestamp_part(). I mean will better use one code for same feature in date_part() and in to_char(). The isoweek2date() is added to timestamp.c too. Right? IMHO in 7.1 will all to_char's features complete. It is cca 41 templates for date/time and cca 21 for numbers. * to_ascii: - gcc, is it correct now? :-) In the patch is documentation for to_char's IW and for to_ascii(). Karel
* Update obsolete comments.Tom Lane2000-08-291-4/+2
|
* Remove configure tests for `signed', `volatile', and signal handler args;Peter Eisentraut2000-08-273-26/+6
| | | | the harm potential outweighs the possible benefits.
* Rename BITSPERBYTE to BITS_PER_BYTE to avoid conflict with <values.h>Tom Lane2000-08-262-6/+6
| | | | on some platforms.
* Avoid creating a TOAST table if we can prove that the maximum tupleTom Lane2000-08-251-1/+2
| | | | | | | length is < TOAST_TUPLE_THRESHOLD, even with toastable column types present. For example, CREATE TABLE foo (f1 int, f2 varchar(100)) does not require a toast table, even though varchar is a toastable type.
* Change return type of:Tatsuo Ishii2000-08-251-4/+4
| | | | | | | pg_mb2wchar(const unsigned char *, pg_wchar *); pg_mb2wchar_with_len(const unsigned char *, pg_wchar *, int); from void to int. Now they return the number of wide chars.
* Make the location of the Kerberos server key file run time configurablePeter Eisentraut2000-08-251-1/+3
| | | | | | | | | (rather than compile time). For libpq, even when Kerberos support is compiled in, the default user name should still fall back to geteuid() if it can't be determined via the Kerberos system. A couple of fixes for string type configuration parameters, now that there is one.
* GetAttributeByName and GetAttributeByNum should be declared to returnTom Lane2000-08-241-4/+4
| | | | Datum, not char*, for portability's sake.
* SQL-language functions are now callable in ordinary fmgr contexts ...Tom Lane2000-08-2413-86/+109
| | | | | | 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.
* Add functions to convert to and from text, and to truncate to MAC OUI.Thomas G. Lockhart2000-08-233-35/+42
| | | | | Remove hardcoded macaddr_manuf(), which had really old, obsolete info. Replace this with some contrib/mac/ code to maniag OUI info from IEEE.
* Fix a many-legged critter reported by chifungfan@yahoo.com: under theTom Lane2000-08-222-5/+10
| | | | | | | | | | right circumstances a hash join executed as a DECLARE CURSOR/FETCH query would crash the backend. Problem as seen in current sources was that the hash tables were stored in a context that was a child of TransactionCommandContext, which got zapped at completion of the FETCH command --- but cursor cleanup executed at COMMIT expected the tables to still be valid. I haven't chased down the details as seen in 7.0.* but I'm sure it's the same general problem.
* Move pg_checkretval out of the planner (where it never belonged) intoTom Lane2000-08-212-6/+4
| | | | | | pg_proc.c (where it's actually used). Fix it to correctly handle tlists that contain resjunk target items, and improve error messages. This addresses bug reported by Krupnikov 6-July-00.
* fmgr interface mopup work. Use new DatumGetBool and BoolGetDatumTom Lane2000-08-211-1/+4
| | | | | | | | macros where appropriate (the code used to have several different ways of doing that, including Int32, Int8, UInt8, ...). Remove last few references to float32 and float64 typedefs --- it's all float4/float8 now. The typedefs themselves should probably stay in c.h for a release or two, though, to avoid breaking user-written C functions.
* First pass at integrating BIT and BIT VARYING code from Adriaan Joubert.Tom Lane2000-08-219-241/+274
| | | | | | | Update functions to new-style fmgr, make BIT and VARBIT be binary- equivalent, add entries to allow these types to be btree indexed, correct a few bugs. BIT/VARBIT are now toastable, too. NOTE: initdb forced due to catalog updates.
* Standardize on just one spelling of BITSPERBYTE.Tom Lane2000-08-201-3/+1
|
* Introduce HAVE_UNIX_SOCKETS symbol to replace repeatedly listing all thePeter Eisentraut2000-08-201-1/+9
| | | | unsupported platforms.
* Make functional indexes accept binary-compatible functions, for exampleTom Lane2000-08-201-1/+5
| | | | CREATE INDEX fooi ON foo (lower(f1)) where f1 is varchar rather than text.
* Clean up handling of variable-free qual clauses. System now does theTom Lane2000-08-134-18/+25
| | | | | | | | | | right thing with variable-free clauses that contain noncachable functions, such as 'WHERE random() < 0.5' --- these are evaluated once per potential output tuple. Expressions that contain only Params are now candidates to be indexscan quals --- for example, 'var = ($1 + 1)' can now be indexed. Cope with RelabelType nodes atop potential indexscan variables --- this oversight prevents 7.0.* from recognizing some potentially indexscanable situations.
* Mop-up for removal of ':' and ';' operators ... like, say, actuallyTom Lane2000-08-121-3/+1
| | | | | take 'em out of pg_operator. Also remove from scan.l's set of legal operator characters. Update documentation.
* Update comments for some parse node types.Tom Lane2000-08-112-8/+8
|
* CREATE btree INDEX takes dead tuples into account when old transactionsHiroshi Inoue2000-08-101-2/+2
| | | | are running.
* Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist'Tom Lane2000-08-087-38/+43
| | | | | | | | from Param nodes, per discussion a few days ago on pghackers. Add new expression node type FieldSelect that implements the functionality where it's actually needed. Clean up some other unused fields in Func nodes as well. NOTE: initdb forced due to change in stored expression trees for rules.
* TOAST mop-up work: update comments for tuple-size-related symbols suchTom Lane2000-08-075-44/+74
| | | | | | | as MaxHeapAttributeNumber. Increase MaxAttrSize to something more reasonable (given what it's used for, namely checking char(n) declarations, I didn't make it the full 1G that it could theoretically be --- 10Mb seemed a more reasonable number). Improve calculation of MaxTupleSize.
* Include the case-insensitive LIKE prototypes.Thomas G. Lockhart2000-08-071-1/+9
|
* Clean up bogosities in use of random(3) and srandom(3) --- do not assumeTom Lane2000-08-072-7/+16
| | | | | | | that RAND_MAX applies to them, since it doesn't. Instead add a config.h parameter MAX_RANDOM_VALUE. This is currently set at 2^31-1 but could be auto-configured if that ever proves necessary. Also fix some outright bugs like calling srand() where srandom() is appropriate.
* Implement LIKE/ESCAPE. Change parser to use like()/notlike()Thomas G. Lockhart2000-08-063-6/+35
| | | | | | | | | | | | | | | | | | | | rather than the "~~" operator; this made it easy to add ESCAPE features. Implement ILIKE, NOT ILIKE, and the ESCAPE clause for them. afaict this is not MultiByte clean, but lots of other stuff isn't either. Fix up underlying support code for LIKE/NOT LIKE. Things should be faster and does not require internal string copying. Update regression test to add explicit checks for LIKE/NOT LIKE/ILIKE/NOT ILIKE. Remove colon and semi-colon operators as threatened in 7.0. Implement SQL99 COMMIT/AND NO CHAIN. Throw elog(ERROR) on COMMIT/AND CHAIN per spec since we don't yet support it. Implement SQL99 CREATE/DROP SCHEMA as equivalent to CREATE DATABASE. This is only a stopgap or demo since schemas will have another implementation soon. Remove a few unused production rules to get rid of warnings which crept in on the last commit. Fix up tabbing in some places by removing embedded spaces.
* Toast all the system-table columns that seem to need it. It turns outTom Lane2000-08-062-20/+27
| | | | | | | | | | | | | | | | that giving pg_proc a toast table required solving the same problems we'd have to solve for pg_class --- pg_proc is one of the relations that gets bootstrapped in relcache.c. Solution is to go back at the end of initialization and read in the *real* pg_class row to replace the phony entry created by formrdesc(). This should work as long as there's no need to touch any toasted values during initialization, which seems a reasonable assumption. Although I did not add a toast-table for every single system table with a varlena attribute, I believe that it would work to just do ALTER TABLE pg_class CREATE TOAST TABLE. So anyone who's really intent on having several thousand ACL entries for a rel could do it. NOTE: I didn't force initdb, but you must do one to see the effects of this patch.
* Clean up inefficiency in ExecRelCheck, and cause it to do the rightTom Lane2000-08-062-5/+7
| | | | | | thing when there are multiple result relations. Formerly, during something like 'UPDATE foo*', foo's constraints and *only* foo's constraints would be applied to all foo's children. Wrong-o ...
* Ensure that catcache 'busy' flags are reset at transaction abort.Tom Lane2000-08-061-1/+2
| | | | | | Without this, an elog during cache-entry load leaves that catcache unusable. elog in that segment of code is pretty unusual but it can happen.
* > I had to back out the patch. It only compiles with multi-byte enabled.Bruce Momjian2000-08-052-1/+36
| | | | | | | | | | | | | | Ooops, I forget... here it is again. > > > If encoding is not supported returns ERROR. and if multibyte not enabled too.... Thanks. Karel ~
* Back out to_ascii patch from Karel.Bruce Momjian2000-08-042-33/+1
|
* Add missing files from Karel, tip from Jan.Bruce Momjian2000-08-041-0/+24
|
* to_ascii( text )Bruce Momjian2000-08-041-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - encode 'text' from database encoding to ASCII to_ascii('\256\341k') to_ascii( text, int4 ) - encode 'text' from 'int4' encoding to ASCII to_ascii('\256\341k', 8) to_ascii( text, name ) - encode 'text' from 'name' encoding to ASCII to_ascii('\256\341k', 'LATIN2') Now is supported LATIN1, LATIN2, WIN1250. For other character sets I haven't good resources. Add new encoding is easy... If encoding is not supported returns ERROR. Note --- not exists total corect conversion to ASCII, this function try convert chars those is _probably_ interpret-able in ASCII for others use ' '. But for example for all Czech characters it is sufficient ... hmm Chinese / JAP and other complicated langs have bad luck here :-( Karel
* Fix tuptoaster bugs induced by making bytea toastable. Durn thing wasTom Lane2000-08-042-12/+44
| | | | | | | | | trying to toast tuples inserted into toast tables! Fix is two-pronged: first, ensure all columns of a toast table are marked attstorage='p', and second, alter the target chunk size so that it's less than the threshold for trying to toast a tuple. (Code tried to do that but the expression was wrong.) A few cosmetic cleanups in tuptoaster too. NOTE: initdb forced due to change in toaster chunk-size.
* Convert inet-related functions to new fmgr style. I have also taken itTom Lane2000-08-033-66/+87
| | | | | | | | on myself to do something about the non-self-consistency of the inet comparison functions. The results are probably still semantically wrong (inet and cidr should have different comparison semantics, I think) but at least the boolean operators now agree with each other and with the sort order of indexes on inet/cidr.
* Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.Tom Lane2000-08-031-1/+3
| | | | | | | | | 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 :-(.
* More functions updated to new fmgr style --- money, name, tid datatypes.Tom Lane2000-08-034-54/+52
| | | | | We're reaching the mopup stage here (good thing too, this is getting tedious).
* Convert all remaining float4 and float8 functions to new fmgr style.Tom Lane2000-08-013-223/+207
| | | | | | At this point I think it'd be possible to make float4 be pass-by-value without too much work --- and float8 too on machines where Datum is 8 bytes. Something to try when the mood strikes, anyway.
* Make acl-related functions safe for TOAST. Mark pg_class.relacl asTom Lane2000-07-314-41/+69
| | | | | compressible but not externally storable (since we're not sure about whether creating a toast relation for pg_class would work).
* Type lztext is toast.Tom Lane2000-07-3010-112/+13
| | | | | | | (Sorry, couldn't help it...) Removed type filename as well, since it's unused and probably useless. INITDB FORCED, because pg_rewrite columns are now plain text again.
* Convert all remaining geometric operators to new fmgr style. ThisTom Lane2000-07-302-336/+319
| | | | | | | | allows fixing problems with operators that expected to be able to return a NULL, such as the '#' line-segment-intersection operator that tried to return NULL when the two segments don't intersect. (See, eg, bug report from 1-Nov-99 on pghackers.) Fix some other bugs in passing, such as backwards comparison in path_distance().
* PATH and POLYGON datatypes are now TOASTable. Associated functionsTom Lane2000-07-294-156/+136
| | | | | updated to new fmgr style. Deleted hoary old functions for compatibility with pre-6.1 representations of these datatypes.
* bpchar, varchar, bytea, numeric are toastable --- if you initdb, whichTom Lane2000-07-294-125/+126
| | | | | | I did not force. I marked numeric as compressable-but-not-move-off-able, partly to test that storage mode and partly because I've got doubts that numerics are large enough to need external storage.