summaryrefslogtreecommitdiff
path: root/src/backend/parser/keywords.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove all traces that suggest that a non-Bison yacc might be supported, andPeter Eisentraut2008-08-291-3/+3
| | | | | change build system to use only Bison. Simplify build rules, make file names uniform. Don't build the token table header file where it is not needed.
* Support "variadic" functions, which can accept a variable number of argumentsTom Lane2008-07-161-1/+2
| | | | | | | | | | | | | | so long as all the trailing arguments are of the same (non-array) type. The function receives them as a single array argument (which is why they have to all be the same type). It might be useful to extend this facility to aggregates, but this patch doesn't do that. This patch imposes a noticeable slowdown on function lookup --- a follow-on patch will fix that by adding a redundant column to pg_proc. Pavel Stehule
* Add a function pg_get_keywords() to let clients find out the set of keywordsTom Lane2008-07-031-2/+5
| | | | known to the SQL parser. Dave Page
* Link in keywords file instead of copying it.Michael Meskes2008-05-211-2/+5
| | | | Use #define/#ifdef instead of sed to fix include files, this should work on Windows too.
* Add a RESTART (without parameter) option to ALTER SEQUENCE, allowing aTom Lane2008-05-161-1/+3
| | | | | | | | | | | | | | sequence to be reset to its original starting value. This requires adding the original start value to the set of parameters (columns) of a sequence object, which is a user-visible change with potential compatibility implications; it also forces initdb. Also add hopefully-SQL-compatible RESTART/CONTINUE IDENTITY options to TRUNCATE TABLE. RESTART IDENTITY executes ALTER SEQUENCE RESTART for all sequences "owned by" any of the truncated relations. CONTINUE IDENTITY is a no-op option. Zoltan Boszormenyi
* Reduce the need for frontend programs to include "postgres.h" by refactoringTom Lane2008-03-271-5/+14
| | | | | | | | | | | | inclusions in src/include/catalog/*.h files. The main idea here is to push function declarations for src/backend/catalog/*.c files into separate headers, rather than sticking them into the corresponding catalog definition file as has been done in the past. This commit only carries out that idea fully for pg_proc, pg_type and pg_conversion, but that's enough for the moment --- if pg_list.h ever becomes unsafe for frontend code to include, we'll need to work a bit more. Zdenek Kotala
* Update copyrights in source tree to 2008.Bruce Momjian2008-01-011-2/+2
|
* pgindent run for 8.3.Bruce Momjian2007-11-151-3/+4
|
* Remove "convert 'blah' using conversion_name" facility, because if itAndrew Dunstan2007-09-241-2/+1
| | | | | produces text it is an encoding hole and if not it's incompatible with the spec, whatever the spec means (which we're not sure about anyway).
* Avoid using TEXT as a Bison symbol, since this provokes warnings onTom Lane2007-08-211-2/+2
| | | | | Windows builds. In passing, fix an obsolete comment, per gripe from Greg Stark.
* Tsearch2 functionality migrates to core. The bulk of this work is byTom Lane2007-08-211-1/+7
| | | | | | | | Oleg Bartunov and Teodor Sigaev, but I did a lot of editorializing, so anything that's broken is probably my fault. Documentation is nonexistent as yet, but let's land the patch so we can get some portability testing done.
* Arrange for quote_identifier() and pg_dump to not quote keywords that areTom Lane2007-06-181-372/+380
| | | | | | | | | | | | | unreserved according to the grammar. The list of unreserved words has gotten extensive enough that the unnecessary quoting is becoming a bit of an eyesore. To do this, add knowledge of the keyword category to keywords.c's table. (Someday we might be able to generate keywords.c's table and the keyword lists in gram.y from a common source.) For the moment, lie about WITH's status in the table so it will still get quoted --- this is because of the expectation that WITH will become reserved when the SQL recursive-queries patch gets done. I didn't force initdb because this affects nothing on-disk; but note that a few regression tests have changed expected output.
* Support UPDATE/DELETE WHERE CURRENT OF cursor_name, per SQL standard.Tom Lane2007-06-111-1/+2
| | | | | | | | | Along the way, allow FOR UPDATE in non-WITH-HOLD cursors; there may once have been a reason to disallow that, but it seems to work now, and it's really rather necessary if you want to select a row via a cursor and then update it in a concurrent-safe fashion. Original patch by Arul Shaji, rather heavily editorialized by Tom Lane.
* Rename the newly-added commands for discarding session state.Neil Conway2007-04-261-1/+3
| | | | | | | | RESET SESSION, RESET PLANS, and RESET TEMP are now DISCARD ALL, DISCARD PLANS, and DISCARD TEMP, respectively. This is to avoid confusion with the pre-existing RESET variants: the DISCARD commands are not actually similar to RESET. Patch from Marko Kreen, with some minor editorialization.
* Support enum data types. Along the way, use macros for the values ofTom Lane2007-04-021-1/+2
| | | | | pg_type.typtype whereever practical. Tom Dunstan, with some kibitzing from Tom Lane.
* Changes pg_trigger and extend pg_rewrite in order to allow triggers andJan Wieck2007-03-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rules to be defined with different, per session controllable, behaviors for replication purposes. This will allow replication systems like Slony-I and, as has been stated on pgsql-hackers, other products to control the firing mechanism of triggers and rewrite rules without modifying the system catalog directly. The firing mechanisms are controlled by a new superuser-only GUC variable, session_replication_role, together with a change to pg_trigger.tgenabled and a new column pg_rewrite.ev_enabled. Both columns are a single char data type now (tgenabled was a bool before). The possible values in these attributes are: 'O' - Trigger/Rule fires when session_replication_role is "origin" (default) or "local". This is the default behavior. 'D' - Trigger/Rule is disabled and fires never 'A' - Trigger/Rule fires always regardless of the setting of session_replication_role 'R' - Trigger/Rule fires when session_replication_role is "replica" The GUC variable can only be changed as long as the system does not have any cached query plans. This will prevent changing the session role and accidentally executing stored procedures or functions that have plans cached that expand to the wrong query set due to differences in the rule firing semantics. The SQL syntax for changing a triggers/rules firing semantics is ALTER TABLE <tabname> <when> TRIGGER|RULE <name>; <when> ::= ENABLE | ENABLE ALWAYS | ENABLE REPLICA | DISABLE psql's \d command as well as pg_dump are extended in a backward compatible fashion. Jan
* Various fixes in the logic of XML functions:Peter Eisentraut2007-01-251-1/+2
| | | | | | | | | | | | | | | | - Add new SQL command SET XML OPTION (also available via regular GUC) to control the DOCUMENT vs. CONTENT option in implicit parsing and serialization operations. - Subtle corrections in the handling of the standalone property in xmlroot(). - Allow xmlroot() to work on content fragments. - Subtle corrections in the handling of the version property in xmlconcat(). - Code refactoring for producing XML declarations.
* Add CREATE/ALTER/DROP OPERATOR FAMILY commands, also COMMENT ON OPERATORTom Lane2007-01-231-1/+2
| | | | | | FAMILY; and add FAMILY option to CREATE OPERATOR CLASS to allow adding a class to a pre-existing family. Per previous discussion. Man, what a tedious lot of cutting and pasting ...
* Add COST and ROWS options to CREATE/ALTER FUNCTION, plus underlying pg_procTom Lane2007-01-221-1/+2
| | | | | | | | | | | | columns procost and prorows, to allow simple user adjustment of the estimated cost of a function call, as well as control of the estimated number of rows returned by a set-returning function. We might eventually wish to extend this to allow function-specific estimation routines, but there seems to be consensus that we should try a simple constant estimate first. In particular this provides a relatively simple way to control the order in which different WHERE clauses are applied in a plan node, which is a Good Thing in view of the fact that the recent EquivalenceClass planner rewrite made that much less predictable than before.
* Support ORDER BY ... NULLS FIRST/LAST, and add ASC/DESC/NULLS FIRST/NULLS LASTTom Lane2007-01-091-1/+2
| | | | | | | | | | | | per-column options for btree indexes. The planner's support for this is still pretty rudimentary; it does not yet know how to plan mergejoins with nondefault ordering options. The documentation is pretty rudimentary, too. I'll work on improving that stuff later. Note incompatible change from prior behavior: ORDER BY ... USING will now be rejected if the operator is not a less-than or greater-than member of some btree opclass. This prevents less-than-sane behavior if an operator that doesn't actually define a proper sort ordering is selected.
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-051-2/+2
| | | | back-stamped for this.
* Code review for XML patch. Instill a bit of sanity in the location ofTom Lane2006-12-241-10/+10
| | | | | | | the XmlExpr code in various lists, use a representation that has some hope of reverse-listing correctly (though it's still a de-escaping function shy of correctness), generally try to make it look more like Postgres coding conventions.
* Initial SQL/XML support: xml data type and initial set of functions.Peter Eisentraut2006-12-211-1/+18
|
* Added missing entry (CASCADED) in keywords table.Peter Eisentraut2006-10-071-1/+2
|
* Add the ability to create indexes 'concurrently', that is, withoutTom Lane2006-08-251-1/+2
| | | | | blocking concurrent writes to the table. Greg Stark, with a little help from Tom Lane.
* Add INSERT/UPDATE/DELETE RETURNING, with basic docs and regression tests.Tom Lane2006-08-121-1/+2
| | | | | | | | plpgsql support to come later. Along the way, convert execMain's SELECT INTO support into a DestReceiver, in order to eliminate some ugly special cases. Jonah Harris and Tom Lane
* Change the bootstrap sequence so that toast tables for system catalogs areTom Lane2006-07-311-2/+1
| | | | | | | | | | created in the bootstrap phase proper, rather than added after-the-fact by initdb. This is cleaner than before because it allows us to retire the undocumented ALTER TABLE ... CREATE TOAST TABLE command, but the real reason I'm doing it is so that toast tables of shared catalogs will now have predetermined OIDs. This will allow a reasonably clean solution to the problem of locking tables before we load their relcache entries, to appear in a forthcoming patch.
* Fix some missing inclusions identified with new pgcheckdefines tool.Tom Lane2006-07-151-1/+2
|
* Add INCLUDING CONSTRAINTS to CREATE TABLE LIKE.Bruce Momjian2006-06-271-1/+2
| | | | Greg Stark
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-051-2/+2
|
* Protect ADD and HEADER symbols from conflicting with MIPS includes.Bruce Momjian2005-12-271-3/+3
|
* Re-run pgindent, fixing a problem where comment lines after a blankBruce Momjian2005-11-221-2/+2
| | | | | | | | | comment line where output as too long, and update typedefs for /lib directory. Also fix case where identifiers were used as variable names in the backend, but as typedefs in ecpg (favor the backend for indenting). Backpatch to 8.1.X.
* Implement DROP OWNED and REASSIGN OWNED. These new commands facilitate theAlvaro Herrera2005-11-211-1/+3
| | | | | | | | | | | | | | | process of dropping roles by dropping objects owned by them and privileges granted to them, or giving the owned objects to someone else, through the use of the data stored in the new pg_shdepend catalog. Some refactoring of the GRANT/REVOKE code was needed, as well as ALTER OWNER code. Further cleanup of code duplication in the GRANT code seems necessary. Implemented by me after an idea from Tom Lane, who also provided various kind of implementation advice. Regression tests pass. Some tests for the new functionality are also added, as well as rudimentary documentation.
* DROP objecttype IF EXISTS for the following objects:Andrew Dunstan2005-11-191-1/+2
| | | | table view index sequence schema type domain conversion
* Standard pgindent run for 8.1.Bruce Momjian2005-10-151-3/+3
|
* Add ALTER TABLE ENABLE/DISABLE TRIGGER commands. Change pg_dump toTom Lane2005-08-231-1/+3
| | | | | | use these instead of its previous hack of changing pg_class.reltriggers. Documentation is lacking, will add that later. Patch by Satoshi Nagayasu, review and some extra work by Tom Lane.
* Add per-user and per-database connection limit options.Tom Lane2005-07-311-1/+2
| | | | | This patch also includes preliminary update of pg_dumpall for roles. Petr Jelinek, with review by Bruce Momjian and Tom Lane.
* Add a role property 'rolinherit' which, when false, denotes that the roleTom Lane2005-07-261-1/+3
| | | | | | | | | doesn't automatically inherit the privileges of roles it is a member of; for such a role, membership in another role can be exploited only by doing explicit SET ROLE. The default inherit setting is TRUE, so by default the behavior doesn't change, but creating a user with NOINHERIT gives closer adherence to our current reading of SQL99. Documentation still lacking, and I think the information schema needs another look.
* More cleanup on roles patch. Allow admin option to be inherited throughTom Lane2005-06-291-1/+3
| | | | | | role memberships; make superuser/createrole distinction do something useful; fix some locking and CommandCounterIncrement issues; prevent creation of loops in the membership graph.
* Bring syntax of role-related commands into SQL compliance. To avoidTom Lane2005-06-281-2/+8
| | | | | | | | | syntactic conflicts, both privilege and role GRANT/REVOKE commands have to use the same production for scanning the list of tokens that might eventually turn out to be privileges or role names. So, change the existing GRANT/REVOKE code to expect a list of strings not pre-reduced AclMode values. Fix a couple other minor issues while at it, such as InitializeAcl function name conflicting with a Windows system function.
* Replace pg_shadow and pg_group by new role-capable catalogs pg_authidTom Lane2005-06-281-1/+2
| | | | | | | | and pg_auth_members. There are still many loose ends to finish in this patch (no documentation, no regression tests, no pg_dump support for instance). But I'm going to commit it now anyway so that Alvaro can make some progress on shared dependencies. The catalog changes should be pretty much done.
* Add Oracle-compatible GREATEST and LEAST functions. Pavel StehuleTom Lane2005-06-261-1/+3
|
* Make REINDEX DATABASE do what one would expect, namely reindex all indexesTom Lane2005-06-221-1/+2
| | | | | | | in the database. The old behavior (reindex system catalogs only) is now available as REINDEX SYSTEM. I did not add the complementary REINDEX USER case since there did not seem to be consensus for this, but it would be trivial to add later. Per recent discussions.
* Two-phase commit. Original patch by Heikki Linnakangas, with additionalTom Lane2005-06-171-1/+2
| | | | hacking by Alvaro Herrera and Tom Lane.
* Add BETWEEN SYMMETRIC.Bruce Momjian2005-06-141-1/+3
| | | | Pavel Stehule
* Add COPY WITH CVS HEADER to allow a heading line as the first line inBruce Momjian2005-05-071-1/+2
| | | | | | COPY. Andrew Dunstan
* Tag appropriate files for rc3PostgreSQL Daemon2004-12-311-2/+2
| | | | | | | | Also performed an initial run through of upgrading our Copyright date to extend to 2005 ... first run here was very simple ... change everything where: grep 1996-2004 && the word 'Copyright' ... scanned through the generated list with 'less' first, and after, to make sure that I only picked up the right entries ...
* Update copyright to 2004.Bruce Momjian2004-08-291-2/+2
|
* Replace nested-BEGIN syntax for subtransactions with spec-compliantTom Lane2004-07-271-1/+3
| | | | | | | SAVEPOINT/RELEASE/ROLLBACK-TO syntax. (Alvaro) Cause COMMIT of a failed transaction to report ROLLBACK instead of COMMIT in its command tag. (Tom) Fix a few loose ends in the nested-transactions stuff.
* Remove TABLESPACE option of CREATE SEQUENCE; sequences will now alwaysTom Lane2004-07-121-4/+1
| | | | | | | live in database or schema's default tablespace, as per today's discussion. Also, remove some unused keywords from the grammar (PATH, PENDANT, VERSION), and fix ALSO, which was added as a keyword but not added to the keyword classification lists, thus making it worse-than-reserved.