summaryrefslogtreecommitdiff
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
* Use variable aliases, if supplied, rather than real column names inTom Lane2000-09-251-9/+11
| | | | | | | complaints about ungrouped variables. This is for consistency with behavior elsewhere, notably the fact that the relname is reported as an alias in these same complaints. Also, it'll work with subselect- in-FROM where old code didn't.
* Karel missed an ichar->chr ...Tom Lane2000-09-251-2/+2
|
* the patch include:Bruce Momjian2000-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - rename ichar() to chr() (discussed with Tom) - add docs for oracle compatible routines: btrim() ascii() chr() repeat() - fix bug with timezone in to_char() - all to_char() variants return NULL instead textin("") if it's needful. The contrib/odbc is without changes and contains same routines as main tree ... because I not sure how plans are Thomas with this :-) Karel --------------------------------------------------------------------------- This effectively one line patch should fix the fact that foreign key definitions in create table were erroring if a primary key was defined. I was using the columns list to get the columns of the table for comparison, but it got reused as a temporary list inside the primary key stuff. Stephan Szabo
* Fix GEQO optimizer to work correctly with new outer-join-capableTom Lane2000-09-192-7/+10
| | | | | | | query representation. Note that GEQO_RELS setting is now interpreted as the number of top-level items in the FROM list, not necessarily the number of relations in the query. This seems appropriate since we are only doing join-path searching over the top-level items.
* Implement differentiation between CURRENT_USER and SESSION_USER as per SQL.Peter Eisentraut2000-09-194-11/+22
| | | | | | There is still no effective difference but it will kick in once setuid functions exist (not included here). Make old getpgusername() alias for current_user.
* Support for DESTDIR make variable. This is used as in `make installPeter Eisentraut2000-09-171-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | DESTDIR=/else/where' and prepends the value of DESTDIR to the full installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows users to install the package into a location different from the one that was configured and hard-coded into various scripts, e.g., for creating binary packages. DESTDIR is in many cases preferrable over `make install prefix=/else/where' because a) `prefix' affects the path that is hard-coded into the files, which can lead to a `make install prefix=xxx' (as done by the regression test driver) corrupting the files in the source tree with wrong paths. b) it doesn't work at all if a directory was overridden to not depend on `prefix', e.g., --sysconfdir=/etc. (Updating the regression test driver to use DESTDIR is a separate undertaking.) See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08 Sep 2000 12:48:59 +0200, Message-ID: <mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format documentation.
* Reimplement LIKE/ESCAPE as operators so that indexscan optimizationTom Lane2000-09-154-43/+49
| | | | | can still work, per recent discussion on pghackers. Correct some bugs in ILIKE implementation.
* First cut at full support for OUTER JOINs. There are still a few looseTom Lane2000-09-1224-212/+381
| | | | | ends to clean up (see my message of same date to pghackers), but mostly it works. INITDB REQUIRED!
* Btree WAL records.Vadim B. Mikheev2000-09-121-1/+67
|
* This patch implements the following command:Bruce Momjian2000-09-122-5/+9
| | | | | | | | | | ALTER TABLE <tablename> OWNER TO <username> Only a superuser may execute the command. -- Mark Hollomon mhh@mindspring.com
* This patch implements a different "relkind"Bruce Momjian2000-09-122-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for views. Views are now have a "relkind" of RELKIND_VIEW instead of RELKIND_RELATION. Also, views no longer have actual heap storage files. The following changes were made 1. CREATE VIEW sets the new relkind 2. The executor complains if a DELETE or INSERT references a view. 3. DROP RULE complains if an attempt is made to delete a view SELECT rule. 4. CREATE RULE "_RETmytable" AS ON SELECT TO mytable DO INSTEAD ... 1. checks to make sure mytable is empty. 2. sets the relkind to RELKIND_VIEW. 3. deletes the heap storage files. 5. LOCK myview is not allowed. :) 6. the regression test type_sanity was changed to account for the new relkind value. 7. CREATE INDEX ON myview ... is not allowed. 8. VACUUM myview is not allowed. VACUUM automatically skips views when do the entire database. 9. TRUNCATE myview is not allowed. THINGS LEFT TO THINK ABOUT o pg_views o pg_dump o pgsql (\d \dv) o Do we really want to be able to inherit from views? o Is 'DROP TABLE myview' OK? -- Mark Hollomon
* 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
|