Commit Graph

201 Commits

Author SHA1 Message Date
Bruce Momjian d3423daaee Fix cfor typos. 1999-01-18 06:46:33 +00:00
Bruce Momjian fd7b963316 Fix for typo in gram.y 1999-01-18 06:32:27 +00:00
Bruce Momjian bd8ffc6f3f Hi!
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
1999-01-18 00:10:17 +00:00
Vadim B. Mikheev dfa23f5e41 SELECT FOR UPDATE syntax 1999-01-05 15:46:25 +00:00
Jan Wieck 0e9d75c6ac Added NUMERIC data type with many builtin funcitons, operators
and aggregates.

Jan
1998-12-30 19:56:35 +00:00
Vadim B. Mikheev 3498d878cb SET TRANSACTION ISOLATION LEVEL ...
LOCK TABLE IN ... MODE
...implemented
1998-12-18 09:10:39 +00:00
Bruce Momjian 31d825ba07 While investigating a user's complaint, I have found some memory
destructions in 6.4 source using purify.

(1) parser/gram.y:fmtId()

It writes n+3 bytes into n+1 byte-long memory area if mixed case or
non-ascii identifiers given.

(2) catalog/index.c:

ATTRIBUTE_TUPLE_SIZE bytes are allocated but
sizeof(FormData_pg_attribute) bytes are written. Note that
ATTRIBUTE_TUPLE_SIZE is smaller than
sizeof(FormData_pg_attribute). (for example, on solaris 2.6,

Tatsuo Ishii
1998-12-13 04:37:51 +00:00
Thomas G. Lockhart bedd04a551 Implement CASE expression. 1998-12-04 15:34:49 +00:00
Thomas G. Lockhart 56792f3729 Allow TIMESTAMP as a column name or general identifier.
timestamp had become a token a while ago, but had been omitted from the
 keywords.c until recently. This uncovered the omission in the ColId decl.
1998-10-14 15:57:25 +00:00
Thomas G. Lockhart d12d4c78e5 Add wildcard asterisk to the UNLISTEN syntax. 1998-10-09 07:06:37 +00:00
Bruce Momjian 173c555948 Make functions static or ifdef NOT_USED. Prevent pg_version creation. 1998-10-08 18:30:52 +00:00
Bruce Momjian 9b21a18cee the following little patch adds array references to query
parameters. With it applied a function like

    CREATE FUNCTION getname(oid8, int4) RETURNS name AS
        'SELECT typname FROM pg_type WHERE oid = $1[$2]'
        LANGUAGE 'sql';

    is possible. Mainly I need this to enable array references in
    expressions for PL/pgSQL. Complete regression test ran O.K.

Jan
1998-10-02 16:23:07 +00:00
Thomas G. Lockhart c683abb1f0 Add as many keywords as possible to column identifier or label lists.
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.
1998-09-30 05:47:57 +00:00
Thomas G. Lockhart ee88006cf2 Clean up code in analyze.c for SERIAL data type.
Remove _all_ PARSEDEBUG print statements.
1998-09-25 13:36:08 +00:00
Thomas G. Lockhart 20693de474 Support specifying PRIMARY KEY for the SERIAL type.
Change DEFAULT NULL to send back a NULL pointer
 rather than a string "NULL". This seems to work, where sending
 the string led to type conversion problems (and probably the wrong
 thing anyway).
1998-09-16 14:29:35 +00:00
Thomas G. Lockhart f16f35a0f8 Support SQL92-ish DECLARE and FETCH commands.
Adds a few new keywords, but all are allowed as column names etc.
1998-09-13 04:19:33 +00:00
Thomas G. Lockhart 80c3241da7 Support CREATE TABLE DEFAULT VALUES statement. 1998-09-02 15:47:30 +00:00
Bruce Momjian af74855a60 Renaming cleanup, no pgindent yet. 1998-09-01 03:29:17 +00:00
Bruce Momjian 093beb3560 Make attalign match type alignment. 1998-08-26 05:22:58 +00:00
Marc G. Fournier f62d1253ef 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.
1998-08-25 21:37:08 +00:00
Thomas G. Lockhart 12cf9f8075 Support SERIAL column type. Expand into an integer column but mark
is_sequence in the ColumnDef structure.
1998-08-25 15:04:24 +00:00
Bruce Momjian c0b01461db o note that now pg_database has a new attribuite "encoding" even
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
1998-08-24 01:14:24 +00:00
Marc G. Fournier 338c54cbc1 From: Jan Wieck <jwieck@debis.com>
Hi,

    as  proposed here comes the first patch for the query rewrite
    system.

  <for details, see archive dated Mon, 17 Aug 1998>
1998-08-18 00:49:04 +00:00
Thomas G. Lockhart 73fae67a0d Allow NOT LIKE, IN, NOT IN, BETWEEN, and NOT BETWEEN expressions
in constraint clauses.
 IN and NOT IN only allow constaints, not subselects.
Jose' Soares' new reference docs pointed out the discrepency.
 Updating the docs too...
1998-08-17 16:08:34 +00:00
Marc G. Fournier a1627a1d64 From: David Hartwig <daybee@bellatlantic.net>
I have attached a patch to allow GROUP BY and/or ORDER BY function or
expressions.  Note worthy items:

1. The expression or function need not be in the target list.
Example:
            SELECT  name FROM foo GROUP BY lower(name);

2.   Simplified the grammar to use expressions only.

3.  Cleaned up earlier patch in this area to make use of existing
utility functions.

3.  Reduced some of the members in the SortGroupBy parse node.   The
original data members were redundant with the new expression node.
(MUST do a "make clean" now)

4.  Added a new parse node "JoinUsing".   The JOIN USING clause was
overloading this SortGroupBy structure.   With the afore mentioned
reduction of members, the two clauses lost all their commonality.

5.  A bug still exist where, if a function or expression is GROUPed BY,
and an aggregate function does not include a attribute from the
expression or function, the backend crashes.   (or something like
that)   The bug pre-dates this patch.    Example:

    SELECT lower(a) AS lowcase, count(b) FROM foo GROUP BY lowcase;
                 *** BOOM  ***

    --Also when not in target list
    SELECT  count(b) FROM foo GROUP BY lower(a);
                *** BOOM  AGAIN ***
1998-08-05 04:49:19 +00:00
Bruce Momjian 0b44238841 Fix encoding grammer problem. 1998-08-04 17:37:48 +00:00
Marc G. Fournier 5979d73841 From: t-ishii@sra.co.jp
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).
1998-07-26 04:31:41 +00:00
Bruce Momjian 01a651aaf9 Fix compile error. Make transaction/work optional on all transaction
statements.  More cleanups of psql help.  Fix for shift/reduce on
UNION in subselect.
1998-07-26 01:18:09 +00:00
Bruce Momjian d8d0aa019b Update psql help syntax to remove <> and uppercaese keywords. 1998-07-25 00:17:30 +00:00
Marc G. Fournier bf00bbb0c4 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.
1998-07-24 03:32:46 +00:00
Bruce Momjian 460b20a43f 1) Queries using the having clause on base tables should work well
now. Here some tested features, (examples included in the patch):

1.1) Subselects in the having clause 1.2) Double nested subselects
1.3) Subselects used in the where clause and in the having clause
     simultaneously 1.4) Union Selects using having 1.5) Indexes
on the base relations are used correctly 1.6) Unallowed Queries
are prevented (e.g. qualifications in the
     having clause that belong to the where clause) 1.7) Insert
into as select

2) Queries using the having clause on view relations also work
   but there are some restrictions:

2.1) Create View as Select ... Having ...; using base tables in
the select 2.1.1) The Query rewrite system:

2.1.2) Why are only simple queries allowed against a view from 2.1)
? 2.2) Select ... from testview1, testview2, ... having...; 3) Bug
in ExecMergeJoin ??


Regards Stefan
1998-07-19 05:49:26 +00:00
Bruce Momjian 86883aec4f Allow UNION in subselect. 1998-07-15 15:56:36 +00:00
Thomas G. Lockhart 92ed9294de Allow floating point constants for "def_arg" numeric arguments.
Used in the generic "CREATE xxx" parsing.
Do some automatic type conversion for inserts from other columns.
Previous trouble with "resjunk" regression test remains for now.
1998-07-08 14:04:11 +00:00
Thomas G. Lockhart ca354d9027 Implement TIMEZONE_HOUR, TIMEZONE_MINUTE per SQL92 specs.
Check for and properly ignore FOREIGN KEY column constraints
 (already had fixed same for table constraints).
Define USER as synonym for CURRENT_USER per SQL92 specs
 (no longer allowed as bare column name, sorry).
Re-enable HAVING clause but no fixes elsewhere yet.
Make "char" type a synonum for "char(1)" (actually implemented as bpchar).
Compress/compact row-style subselect and operator definitions
 (cut out ~140 lines of code with no change in functionality).
Save string type if specified for DEFAULT clause handling.
Enough for now...
1998-05-09 23:22:15 +00:00
Bruce Momjian 323fefdb9d Update HISTORY/TODO. Disable HAVING. 1998-04-17 04:12:56 +00:00
Bruce Momjian 8eb08ae6b9 Cleanup up code. 1998-04-13 21:07:15 +00:00
Thomas G. Lockhart 242b347877 Prepare the EXTRACT() clause for supporting TIMEZONE_HOUR
and TIMEZONE_MINUTE but don't introduce until v6.4.
Fix SET TIMEZONE LOCAL to pass null pointer
 rather than older "default" string.
Fix handling of NULL pointer returns from FOREIGN KEY clauses
 which are currently ignored.
Allow START as a table/column name.
1998-04-08 06:39:01 +00:00
Bruce Momjian c579ce0fb0 I started adding the Having Clause and it works quite fine for
sequential scans! (I think it will also work with hash, index, etc
but I did not check it out! I made some High level changes which
should work for all access methods, but maybe I'm wrong. Please
let me know.)

Now it is possible to make queries like:

select s.sname, max(p.pid), min(p.pid) from part p, supplier s
where s.sid=p.sid group by s.sname having max(pid)=6 and min(pid)=1
or avg(pid)=4;

Having does not work yet for queries that contain a subselect
statement in the Having clause, I'll try to fix this in the next
days.

If there are some bugs, please let me know, I'll start to read the
mailinglists now!

Now here is the patch against the original 6.3 version (no snapshot!!):

Stefan
1998-03-30 16:36:43 +00:00
Thomas G. Lockhart 561aead3f1 Allow parsing expressions with ") -" (scan.l, scan.c only).
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.
1998-03-18 16:50:25 +00:00
Thomas G. Lockhart 2d87654aeb Repair "LIKE" behavior with two adjacent wildcard characters ("_").
Was ignoring second wildcard.
1998-03-07 06:04:59 +00:00
Marc G. Fournier 780068f812 From: Jan Wieck <jwieck@debis.com>
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.
1998-02-25 13:09:49 +00:00
Thomas G. Lockhart 64ebb583bc Allow LIKE expression in constraint clause.
Allow USER and VALID as column names and identifiers.
1998-02-18 07:25:57 +00:00
Vadim B. Mikheev 581166da91 Fix useor for (a,b...) Op ANY/ALL 1998-02-18 03:26:54 +00:00
Vadim B. Mikheev 6eeb3d9eac gram.y: ALL_SUBLINK type was returned for x Op (subquery).
parse_expr.c: only Op of bool type are supported currently...
1998-02-13 08:10:33 +00:00
Thomas G. Lockhart cad3c5d35b Try bumping to version two... 1998-02-11 04:11:19 +00:00
Thomas G. Lockhart 878b8d64c8 Define ROW and STATEMENT as parser tokens.
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".
1998-02-11 04:09:54 +00:00
Bruce Momjian 2c482cdbf2 Pass attypmod through to executor by adding to Var and Resdom. 1998-02-10 04:02:59 +00:00
Thomas G. Lockhart c1dcd59c48 Allow most expressions in BETWEEN clause. Allow all expressions if
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.
1998-02-04 06:11:48 +00:00
Bruce Momjian 00f325d510 Subselects with =, >, etc.
Cleanup for vacuum help, manual page, and error message
1998-02-03 19:27:30 +00:00
Thomas G. Lockhart a90b6a4464 Remove unused keyword CHANGE. 1998-02-03 16:04:05 +00:00
Bruce Momjian c18ed2f5a7 Parser cleanup for expr and subqueries. 1998-02-03 01:53:24 +00:00
Bruce Momjian 6159ba3ab1 AIX patch from Darren King and Univel patch from Billy Allie, mostly
related to grammar and parser issues, with one postmaster fix.
1998-02-01 19:43:54 +00:00
Marc G. Fournier 81dc201921 Wish ppl would make up their mnd :) 1998-01-25 04:12:28 +00:00
Marc G. Fournier 47ad8d1cf5 OOps...missed the second patch of patch two that uses pfree() instead of
free()

From: James Hughes <jamesh@interpath.com>
1998-01-25 04:10:32 +00:00
Marc G. Fournier 151a1238d2 This is the second of two patches required to fix the the grant and
revoke statements.

From: James Hughes <jamesh@interpath.com>
1998-01-25 04:08:54 +00:00
Bruce Momjian 7015dfef4b Add LOCK command as DELETE FROM ... WHERE false. 1998-01-22 23:05:18 +00:00
Bruce Momjian 412a5e6539 Parser cleanup.
Add lock to i386 asm.
1998-01-20 05:05:08 +00:00
Bruce Momjian 588867bd7b Create SubLink nodes in parser for Vadim. 1998-01-19 05:06:41 +00:00
Bruce Momjian 53622d66d2 Gram.y cleanup. 1998-01-17 05:01:34 +00:00
Bruce Momjian b37bc65f44 Creates the SubLink structure, and the Query->hasSubLink field,
with supporting code.

Creates SubLink node in gram.y.

psql.c patch for newatttypmod field.
1998-01-17 04:53:46 +00:00
Bruce Momjian c65ea0e040 New pg_attribute.atttypmod for type-specific information like
varchar length.

Cleans up code so attlen is always length.

Removed varchar() hack added earlier.

Will fix bug in selecting varchar() fields, and varchar() can be
variable length.
1998-01-16 23:21:07 +00:00
Bruce Momjian 660f458d3b Clean up of copyfuncs. 1998-01-11 20:02:32 +00:00
Bruce Momjian 600c958a30 Add UNION, GROUP, DISTINCT to INSERT. 1998-01-11 03:41:57 +00:00
Bruce Momjian e6c714bf30 Bye CursorStmt, now use SelectStmt. 1998-01-10 04:30:11 +00:00
Bruce Momjian e7b205b486 Remove old quel labels. 1998-01-09 21:26:12 +00:00
Bruce Momjian 3d15d1332a Remove old quel labels. 1998-01-09 20:06:08 +00:00
Bruce Momjian deea69b90e Change some ABORTS to ERROR. Add line number when COPY Failure. 1998-01-05 16:40:20 +00:00
Bruce Momjian 0d9fc5afd6 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 03:35:55 +00:00
Bruce Momjian 4b05912f0b Fix for count(*), aggs with views and multiple tables and sum(3). 1998-01-04 04:31:43 +00:00
Thomas G. Lockhart fcabd0753c Change precedence for boolean operators to match expected behavior.
Change NOTICE/NOTICE/NOTICE/WARN elog messages to a single message
 with a few newline/tab breaks embedded in the string. Much cleaner I hope.
1998-01-01 05:44:54 +00:00
Bruce Momjian 6231e161c9 Implementation of UNIONs. 1997-12-24 06:06:58 +00:00
Thomas G. Lockhart 2c833a728f Implement CREATE TABLE ... AS SELECT borrowing code from SubSelect
and from SELECT ... INTO ... support code.
Allow NOT, IS NULL, IS NOT NULL in constraints.
Define unionall boolean flag in SubSelect structure.
Implement row descriptors: (a, b, c) = (x, y, z).
Change IS TRUE, IS FALSE, etc. to expressions using "=" rather than
 function calls to istrue() or isfalse() to allow optimization.
Force type for TRUE and FALSE to bool.
1997-12-23 19:47:32 +00:00
Thomas G. Lockhart 331a163693 Allow multiple-argument functions in constraint clauses.
Formerly allowed only single arguments.
Declare column constraints using the usual list mechanism rather
 than explicit itemized lists.
Remove NOTNULL from default clause syntax (retain "NOT NULL").
 NOTNULL is not SQL92; eventually remove it from expressions too?
Move ISNULL, NOTNULL to Postgres-specific token declarations.
Fix up tabs and indenting on new CREATE USER commands.
1997-12-16 15:50:54 +00:00
Bruce Momjian a68a132a6c Add VARHDRSZ where needed. Many places just used 4. 1997-12-06 22:57:36 +00:00
Thomas G. Lockhart 1ac4ae4993 Add SQL92-compliant syntax for constraints.
Implement PRIMARY KEY and UNIQUE clauses using indices.
1997-12-04 23:07:23 +00:00
Marc G. Fournier 4c04f7724e From: todd brandys <brandys@eng3.hep.uiuc.edu>
An extension to the code to allow for a pg_password authentication database
that is *seperate* from the system password file
1997-12-04 00:28:15 +00:00
Bruce Momjian 333323f304 Fix vacuum analyze syntax problem. 1997-12-02 16:09:15 +00:00
Thomas G. Lockhart 8f4865bdd7 Remove premature code in constraint parsing.
Change elog WARN to NOTICE for unimplemented constraints.
1997-12-02 02:54:15 +00:00
Thomas G. Lockhart 07c1837f50 Change elog WARN messages for UNIQUE and PRIMARY, FOREIGN KEY
to NOTICE messages so that execution proceeds rather than halting.
 These clauses are ignored as stated in the messages.
Allow NOT NULL UNIQUE syntax (both were allowed individually before).
Allow Postgres-style casting ("::") of non-constants.
1997-11-30 23:11:10 +00:00
Bruce Momjian 4a5b781d71 Break parser functions into smaller files, group together. 1997-11-25 22:07:18 +00:00
Bruce Momjian 3aff4011c7 Remove gram problems with archive. 1997-11-24 16:55:22 +00:00
Bruce Momjian 3fa2bb316c Remove archive stuff. 1997-11-21 18:12:58 +00:00
Bruce Momjian e9e1ff226f Remove all time travel stuff. Small parser cleanup. 1997-11-20 23:24:03 +00:00
Thomas G. Lockhart 4b19101fc3 Update UNION and subselect syntax.
Support SQL92 syntax for type coersion of strings (type 'typeval').
 Example: "DATETIME 'now'". This works only for string constants and can
 not replace the CAST and ::type syntax which behave identically in this
 context.
1997-11-17 16:37:24 +00:00
Bruce Momjian 1c32d285a6 Remove pg_magic, defaults, server, hosts, and demon tables. unused. 1997-11-15 20:58:05 +00:00
Bruce Momjian 430169a5ea FIx for indexing regex stuff. Change rowoid to objoid. 1997-11-14 06:09:07 +00:00
Bruce Momjian ea4223c45f FIx for indexing regex stuff. Change rowoid to objoid. 1997-11-14 05:57:46 +00:00
Thomas G. Lockhart 25e950fca4 Change messages regarding "TimeRange" to say that time travel is no longer
available.
Remove lots of #ifdef'd debugging print statements.
1997-11-10 15:22:36 +00:00
Thomas G. Lockhart acc2843025 Implement CREATE DATABASE/WITH LOCATION=.
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.
1997-11-07 07:02:10 +00:00
Vadim B. Mikheev 32cd09ac6d Good Bye, Time Travel! 1997-11-02 15:27:14 +00:00
Bruce Momjian 1e7ba76e43 Indexes for LIKE and ~, !~ operations. 1997-10-31 00:50:39 +00:00
Thomas G. Lockhart 770352d279 Add support for SQL92 delimited identifiers.
Add support for SQL3 IS TRUE and IS FALSE.
Augment support for SQL92 SET TIME ZONE...
1997-10-30 16:39:27 +00:00
Vadim B. Mikheev 7bff4c5078 Now we are able to CREATE PROCEDURAL LANGUAGE (Thanks, Jan). 1997-10-28 15:11:45 +00:00
Thomas G. Lockhart f10b639237 Add SQL92 "constants" CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP,
CURRENT_USER.
Add syntax for primary and foreign keys.
Change optional syntax in CREATE INDEX to avoid parsing conflict with
 TIMESTAMP WITH TIME ZONE data type (use USING <class> rather than WITH...).
Decouple various categories of data type syntax to allow the most possible
 non-ambiguous extensions to SQL92 for column names and labels. This should
 make the parser a bit more understandable, or at least easier to find
 where and how the data types are handled.
Support syntax for IN and EXISTS clauses with subselects.
Support SQL92 syntax for IS TRUE/IS FALSE/IS NOT TRUE/IS NOT FALSE.
1997-10-25 05:56:41 +00:00
Bruce Momjian f3af1368bd Rename strNcpy to StrNCpy, and change third parameter. 1997-10-25 01:10:58 +00:00
Thomas G. Lockhart c927f80fe4 Use P_TYPE rather than TYPE_P (which will be the name in the next release). 1997-10-09 05:43:59 +00:00
Thomas G. Lockhart 0f66d799a3 Allow both TIME and TYPE as column and table names. 1997-10-09 05:35:30 +00:00
Thomas G. Lockhart f54cc390e1 Allow TIME in column and table names (SQL/92 non-reserved word). 1997-10-09 05:00:54 +00:00
Vadim B. Mikheev 5a447b4a26 MOVE implementation. 1997-09-29 05:59:16 +00:00
Thomas G. Lockhart b105324f7e Fix SUBSTRING(str FROM int TO int) parsing. 1997-09-26 15:09:11 +00:00