Commit Graph

159 Commits

Author SHA1 Message Date
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
Thomas G. Lockhart 27d0d1a159 Add SQL92 reserved words for primary and foreign keys.
Add keywords for national character types.
Shorted date/time keyword token names for convenience.
Add SQL3 reserved words TRUE and FALSE.
1997-10-25 05:44:11 +00:00
Bruce Momjian f3af1368bd Rename strNcpy to StrNCpy, and change third parameter. 1997-10-25 01:10:58 +00:00
Vadim B. Mikheev 9b10d6ffda Ignore copies of columns specified in ORDER/GROUP BY 1997-10-16 06:58:38 +00:00
Thomas G. Lockhart b0df88745d Include SQL/92 string continuation across newlines.
Allows the following example:
  select 'first string'
  '---'
  'last string';
 to be output as 'first string---last string'.
1997-10-15 01:12:21 +00:00
Vadim B. Mikheev defb10a450 DEFAULT is handled by analyze.c now. 1997-10-12 07:09:20 +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
Thomas G. Lockhart 5004b99e92 Tatsuo's patch to fix alignment problems in structure for RISC machines. 1997-09-25 14:11:42 +00:00
Thomas G. Lockhart e008c68408 One more change to recover v6.1.1 escaped-text input behavior.
Should be changed for v6.3!
1997-09-25 14:10:23 +00:00
Thomas G. Lockhart 16d65f5c25 Add SQL/92 "constants" current_date, current_time, and current_timestamp.
Add SQL/92 types decimal and numeric (temporary for syntax support).
 These types need more support in the backend to be really implemented,
 and the parser will need to be changed at that time.
Adjust limits on precision parameters for FLOAT(p) to match IEEE-compliant
 arithmetic. Perhaps these limits should be processor-specific or obtained
 from system include files instead.
1997-09-24 17:53:53 +00:00
Thomas G. Lockhart ba8763c500 Add SQL/92 types decimal and numeric.
Add SQL/92 "constants" current_date, current_time, and current_timestamp.
1997-09-24 17:49:56 +00:00
Thomas G. Lockhart 53ad0aa262 Restore proper behavior for escaped quotes and for escaped literals
like newline inside quoted strings.
1997-09-24 17:48:25 +00:00
Vadim B. Mikheev f79b7a56b4 Allow use functions with no arguments in DEFAULT
Allow use IDENT as arguments of trigger functions
1997-09-24 08:31:04 +00:00
Thomas G. Lockhart 3bb89a27ee Add support for FLOAT(p) SQL/92 data type.
Allow ALTER TABLE ADD ( column ) syntax.
1997-09-20 16:11:44 +00:00
Bruce Momjian 3f365ba0fc Inline memset() as MemSet(). 1997-09-18 20:22:58 +00:00
Vadim B. Mikheev 4948a51d74 Convert sequence names tolower. 1997-09-18 14:32:15 +00:00
Thomas G. Lockhart c407a38742 Add syntax and warnings for unsupported ALTER TABLE commands
including DROP COLUMN, SET CONSTRAINT, etc.
1997-09-18 03:46:18 +00:00
Thomas G. Lockhart 43163cf5d6 Fix string conversions for operators in DEFAULT and CHECK clauses. 1997-09-16 16:11:20 +00:00
Thomas G. Lockhart bc85dbf893 Remove backdoor strings from scan.l for DEFAULT and CHECK.
Reconstruct string input for DEFAULT and CHECK.
Add DOUBLE PRECISION, CHARACTER (VARYING) SQL-92 data types.
1997-09-13 03:15:46 +00:00
Thomas G. Lockhart 9ea74630fc Add a few keywords for SQL-92 support. 1997-09-13 03:13:37 +00:00
Thomas G. Lockhart 0fbfba11f6 Use exclusive state to help fix unary minus parsing.
Remove "backdoor" for DEFAULT and CHECK.
1997-09-13 03:12:55 +00:00
Thomas G. Lockhart c1d3c04d38 Fix up error messages. 1997-09-13 03:11:51 +00:00
Bruce Momjian fe54c54da3 Allow SELECT NULL as EMPTY_FIELD, Patrick. 1997-09-12 22:14:48 +00:00
Vadim B. Mikheev 4379ce8380 Quick hack to get CHECK working for incoming betta. 1997-09-12 09:01:46 +00:00
Bruce Momjian 1ea01720d5 heapattr functions now return a Datum, not char *. 1997-09-12 04:09:08 +00:00
Bruce Momjian 59f6a57e59 Used modified version of indent that understands over 100 typedefs. 1997-09-08 21:56:23 +00:00
Bruce Momjian 075cede748 Add typdefs to pgindent run. 1997-09-08 20:59:27 +00:00
Bruce Momjian 23db70bf73 Lex/yacc source cleanup like indent. 1997-09-08 03:20:18 +00:00
Bruce Momjian 319dbfa736 Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
Bruce Momjian 1ccd423235 Massive commit to run PGINDENT on all *.c and *.h files. 1997-09-07 05:04:48 +00:00
Bruce Momjian ae50c8d84b Cleanups needed for indent. 1997-09-05 19:32:44 +00:00
Bruce Momjian a1635450b3 Cleanups needed for indent. Remove }; 1997-09-05 18:13:45 +00:00
Vadim B. Mikheev c753a6a1e2 Restore CurScanPosition() for flex.
Fix it for lex.
1997-09-05 09:05:48 +00:00
Bruce Momjian 868d708188 Add // comments. 1997-09-05 00:09:47 +00:00
Vadim B. Mikheev bad4bc40b9 CREATE/DROP TRIGGER syntax 1997-09-04 13:24:26 +00:00
Thomas G. Lockhart ec70b3c07c Remove comment line in rules section. Keith reports trouble on Solaris
and O'Reilly "lex & yacc" book claims ATT-lex has trouble with comments.
1997-09-02 02:32:35 +00:00
Thomas G. Lockhart 570620c569 Add SQL92 string handling features (SUBSTRING, TRIM, EXTRACT).
Add parsing for UNION and outer JOINs.
Implement SQL92 "WITH TIME ZONE".
Allow some reserved words as identifiers and column labels.
Clean up indentation and "orphan spaces and tabs".
1997-09-01 06:00:35 +00:00
Thomas G. Lockhart 05cdb99bfb Add detection and warnings for UNION and HAVING clauses.
Generate non-fatal warning only and proceed by ignoring clauses.
1997-09-01 05:56:34 +00:00
Thomas G. Lockhart 05eb632864 Add more reserved words, mostly for SQL92 compliance.
Include reserved words for string handling, outer joins, and unions.
1997-09-01 05:53:31 +00:00
Thomas G. Lockhart 559a28747a Use exclusive states for parsing quoted strings.
Implement extended comments ("/* ... */") using exclusive states.
Modify definitions of operators to remove some restrictions on characters
 and character order.
1997-09-01 05:51:52 +00:00
Vadim B. Mikheev becd2f9b82 Fix for "default = '...'" in CREATE TYPE 1997-08-28 05:02:01 +00:00
Vadim B. Mikheev c0784f6d96 Restore CONSTRAINT keyword (was lost ... by unknown way) 1997-08-22 14:33:21 +00:00
Bruce Momjian 021778eed3 We store Cash/money as int of size 4, so make it an int rather than a long. 1997-08-22 07:13:01 +00:00
Vadim B. Mikheev 9b6d8878fd There is no NULL constraint in CREATE TABLE - only NOT NULL one. 1997-08-22 03:17:55 +00:00
Bruce Momjian 3dd23aadf0 Allow functions and operators on internally-identical types to succeed. 1997-08-22 00:02:19 +00:00
Vadim B. Mikheev e3accffe66 Syntax for [CONSTRAINT name] CHECK ... 1997-08-21 01:34:44 +00:00