- 23 Sep, 1999 1 commit
-
-
Bruce Momjian authored
-
- 17 Jul, 1999 1 commit
-
-
Bruce Momjian authored
-
- 15 Jul, 1999 1 commit
-
-
Bruce Momjian authored
-
- 13 Jul, 1999 1 commit
-
-
Bruce Momjian authored
-
- 12 May, 1999 1 commit
-
-
Thomas G. Lockhart authored
and lock syntax as fully parsed tokens. Two keywords for isolation are non-reserved SQL92 (COMMITTED, SERIALIZABLE). All other new keywords are non-reserved Postgres (not SQL92) (ACCESS, EXCLUSIVE, MODE, SHARE). Add syntax to allow CREATE [GLOBAL|LOCAL] TEMPORARY TABLE, throwing an error if GLOBAL is specified.
-
- 19 Apr, 1999 1 commit
-
-
Bruce Momjian authored
-
- 07 Mar, 1999 1 commit
-
-
Bruce Momjian authored
-
- 13 Feb, 1999 1 commit
-
-
Bruce Momjian authored
-
- 08 Feb, 1999 1 commit
-
-
Jan Wieck authored
Removed CURRENT keyword for rule queries and changed rules regression accordingly. CURRENT has beed announced to disappear in v6.5. Jan
-
- 02 Feb, 1999 1 commit
-
-
Bruce Momjian authored
-
- 18 Jan, 1999 1 commit
-
-
Bruce Momjian authored
INTERSECT and EXCEPT is available for postgresql-v6.4! The patch against v6.4 is included at the end of the current text (in uuencoded form!) I also included the text of my Master's Thesis. (a postscript version). I hope that you find something of it useful and would be happy if parts of it find their way into the PostgreSQL documentation project (If so, tell me, then I send the sources of the document!) The contents of the document are: -) The first chapter might be of less interest as it gives only an overview on SQL. -) The second chapter gives a description on much of PostgreSQL's features (like user defined types etc. and how to use these features) -) The third chapter starts with an overview of PostgreSQL's internal structure with focus on the stages a query has to pass (i.e. parser, planner/optimizer, executor). Then a detailed description of the implementation of the Having clause and the Intersect/Except logic is given. Originally I worked on v6.3.2 but never found time enough to prepare and post a patch. Now I applied the changes to v6.4 to get Intersect and Except working with the new version. Chapter 3 of my documentation deals with the changes against v6.3.2, so keep that in mind when comparing the parts of the code printed there with the patched sources of v6.4. Here are some remarks on the patch. There are some things that have still to be done but at the moment I don't have time to do them myself. (I'm doing my military service at the moment) Sorry for that :-( -) I used a rewrite technique for the implementation of the Except/Intersect logic which rewrites the query to a semantically equivalent query before it is handed to the rewrite system (for views, rules etc.), planner, executor etc. -) In v6.3.2 the types of the attributes of two select statements connected by the UNION keyword had to match 100%. In v6.4 the types only need to be familiar (i.e. int and float can be mixed). Since this feature did not exist when I worked on Intersect/Except it does not work correctly for Except/Intersect queries WHEN USED IN COMBINATION WITH UNIONS! (i.e. sometimes the wrong type is used for the resulting table. This is because until now the types of the attributes of the first select statement have been used for the resulting table. When Intersects and/or Excepts are used in combination with Unions it might happen, that the first select statement of the original query appears at another position in the query which will be executed. The reason for this is the technique used for the implementation of Except/Intersect which does a query rewrite!) NOTE: It is NOT broken for pure UNION queries and pure INTERSECT/EXCEPT queries!!! -) I had to add the field intersect_clause to some data structures but did not find time to implement printfuncs for the new field. This does NOT break the debug modes but when an Except/Intersect is used the query debug output will be the already rewritten query. -) Massive changes to the grammar rules for SELECT and INSERT statements have been necessary (see comments in gram.y and documentation for deatails) in order to be able to use mixed queries like (SELECT ... UNION (SELECT ... EXCEPT SELECT)) INTERSECT SELECT...; -) When using UNION/EXCEPT/INTERSECT you will get: NOTICE: equal: "Don't know if nodes of type xxx are equal". I did not have time to add comparsion support for all the needed nodes, but the default behaviour of the function equal met my requirements. I did not dare to supress this message! That's the reason why the regression test for union will fail: These messages are also included in the union.out file! -) Somebody of you changed the union_planner() function for v6.4 (I copied the targetlist to new_tlist and that was removed and replaced by a cleanup of the original targetlist). These chnages violated some having queries executed against views so I changed it back again. I did not have time to examine the differences between the two versions but now it works :-) If you want to find out, try the file queries/view_having.sql on both versions and compare the results . Two queries won't produce a correct result with your version. regards Stefan
-
- 18 Dec, 1998 1 commit
-
-
Vadim B. Mikheev authored
LOCK TABLE IN ... MODE ...implemented
-
- 04 Dec, 1998 1 commit
-
-
Thomas G. Lockhart authored
-
- 18 Oct, 1998 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 30 Sep, 1998 1 commit
-
-
Thomas G. Lockhart authored
Add "timestamp" to list of tokens in keywords.c. Before, TIMESTAMP WITH TIME ZONE did not actually parser. Reorder token lists to be more alphabetical. Remove ARCHIVE keyword which was deprecated in v6.3.
-
- 13 Sep, 1998 1 commit
-
-
Thomas G. Lockhart authored
Adds a few new keywords, but all are allowed as column names etc.
-
- 01 Sep, 1998 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 25 Aug, 1998 2 commits
-
-
Marc G. Fournier authored
From: Massimo Dal Zotto <dz@cs.unitn.it> > these patches define the UNLISTEN sql command. The code already > existed but it was unknown to the parser. Now it can be used > like the listen command. > You must make clean and delete gram.c and parser.h before make.
-
Thomas G. Lockhart authored
is_sequence in the ColumnDef structure.
-
- 24 Aug, 1998 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
patch is applied: Rewrite rules on relation level work fine now. Event qualifications on insert/update/delete rules work fine now. I added the new keyword OLD to reference the CURRENT tuple. CURRENT will be removed in 6.5. Update rules can reference NEW and OLD in the rule qualification and the actions. Insert/update/delete rules on views can be established to let them behave like real tables. For insert/update/delete rules multiple actions are supported now. The actions can also be surrounded by parantheses to make psql happy. Multiple actions are required if update to a view requires updates to multiple tables. Regular users are permitted to create/drop rules on tables they have RULE permissions for (DefineQueryRewrite() is now able to get around the access restrictions on pg_rewrite). This enables view creation for regular users too. This required an extra boolean parameter to pg_parse_and_plan() that tells to set skipAcl on all rangetable entries of the resulting queries. There is a new function pg_exec_query_acl_override() that could be used by backend utilities to use this facility. All rule actions (not only views) inherit the permissions of the event relations owner. Sample: User A creates tables T1 and T2, creates rules that log INSERT/UPDATE/DELETE on T1 in T2 (like in the regression tests for rules I created) and grants ALL but RULE on T1 to user B. User B can now fully access T1 and the logging happens in T2. But user B cannot access T2 at all, only the rule actions can. And due to missing RULE permissions on T1, user B cannot disable logging. Rules on the attribute level are disabled (they don't work properly and since regular users are now permitted to create rules I decided to disable them). Rules on select must have exactly one action that is a select (so select rules must be a view definition). UPDATE NEW/OLD rules are disabled (still broken, but triggers can do it). There are two new system views (pg_rule and pg_view) that show the definition of the rules or views so the db admin can see what the users do. They use two new functions pg_get_ruledef() and pg_get_viewdef() that are builtins. The functions pg_get_ruledef() and pg_get_viewdef() could be used to implement rule and view support in pg_dump. PostgreSQL is now the only database system I know, that has rewrite rules on the query level. All others (where I found a rule statement at all) use stored database procedures or the like (triggers as we call them) for active rules (as some call them). Future of the rule system: The now disabled parts of the rule system (attribute level, multiple actions on select and update new stuff) require a complete new rewrite handler from scratch. The old one is too badly wired up. After 6.4 I'll start to work on a new rewrite handler, that fully supports the attribute level rules, multiple actions on select and update new. This will be available for 6.5 so we get full rewrite rule capabilities. Jan
-
- 24 Jul, 1998 1 commit
-
-
Marc G. Fournier authored
I really hope that I haven't missed anything in this one... 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.
-
- 09 May, 1998 1 commit
-
-
Thomas G. Lockhart authored
-
- 18 Mar, 1998 1 commit
-
-
Thomas G. Lockhart authored
Make "TABLE" optional in "LOCK TABLE" command and "... INTO TABLE..." clause. Explicitly parse CREATE SEQUENCE options to allow a negative integer as an argument; this is an artifact of unary minus handling in scan.l. Add "PASSWORD" as an allowed column identifier. These fixes will require a "make clean install" but not a dump/reload.
-
- 11 Feb, 1998 1 commit
-
-
Thomas G. Lockhart authored
Use explicit tokens to decode CREATE TRIGGER clauses. Allow ROW and STATEMENT as column identifiers. Fix CAST syntax to require parens per SQL92 spec. Define TypeId to allow correct translation of type names in CREATE FUNCTION and other statements. Need to do this without looking up defined type names because CREATE FUNCTION can specify undefined (new) types. Define UserId to complete removal of "Id" generic entity. Define xlateSqlFunc() to convert SQL92 CHARACTER_LENGTH() and CHAR_LENGTH() functions to calls to length(). Define func_name parser entity for contexts requiring a function name. Have xlateSqlType() translate "float" to "float8".
-
- 04 Feb, 1998 1 commit
-
-
Thomas G. Lockhart authored
surrounded by parentheses (but not all are meaningful). Remove unused keywords ACL, APPEND, MERGE. Requires a "make clean" to recompile all code since keyword numeric assignments have changed with keyword removal.
-
- 03 Feb, 1998 1 commit
-
-
Thomas G. Lockhart authored
-
- 22 Jan, 1998 1 commit
-
-
Bruce Momjian authored
-
- 20 Jan, 1998 1 commit
-
-
Bruce Momjian authored
Add lock to i386 asm.
-
- 19 Jan, 1998 1 commit
-
-
Bruce Momjian authored
-
- 05 Jan, 1998 1 commit
-
-
Bruce Momjian authored
-
- 16 Dec, 1997 1 commit
-
-
Bruce Momjian authored
-
- 04 Dec, 1997 1 commit
-
-
Marc G. Fournier authored
An extension to the code to allow for a pg_password authentication database that is *seperate* from the system password file
-
- 26 Nov, 1997 1 commit
-
-
Bruce Momjian authored
-
- 25 Nov, 1997 1 commit
-
-
Bruce Momjian authored
-
- 24 Nov, 1997 1 commit
-
-
Bruce Momjian authored
-
- 21 Nov, 1997 1 commit
-
-
Bruce Momjian authored
-
- 07 Nov, 1997 1 commit
-
-
Thomas G. Lockhart authored
Implement SET keyword = DEFAULT and SET TIME ZONE DEFAULT. Re-enable JOIN= option in CREATE OPERATOR statement (damaged for v6.2). Allow more SQL and/or Postgres reserved words as column identifiers or, if there are shift/reduce problems, at least as column labels.
-