summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorBruce Momjian2003-05-15 16:35:30 +0000
committerBruce Momjian2003-05-15 16:35:30 +0000
commit12c942383296bd626131241c012c2ab81b081738 (patch)
tree7a37bb6990282b36be53fae1bde399d8e603e9f9 /src/backend/parser
parent2c0556068fc308ed9cce06c85de7e42305d34b86 (diff)
Allow Win32 to compile under MinGW. Major changes are:
Win32 port is now called 'win32' rather than 'win' add -lwsock32 on Win32 make gethostname() be only used when kerberos4 is enabled use /port/getopt.c new /port/opendir.c routines disable GUC unix_socket_group on Win32 convert some keywords.c symbols to KEYWORD_P to prevent conflict create new FCNTL_NONBLOCK macro to turn off socket blocking create new /include/port.h file that has /port prototypes, move out of c.h new /include/port/win32_include dir to hold missing include files work around ERROR being defined in Win32 includes
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/gram.y57
-rw-r--r--src/backend/parser/keywords.c18
2 files changed, 37 insertions, 38 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 4f8b0b10fc9..0a7ae361f49 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.413 2003/05/04 00:03:55 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.414 2003/05/15 16:35:28 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -322,12 +322,12 @@ static void doNegateFloat(Value *v);
*/
/* ordinary key words in alphabetical order */
-%token <keyword> ABORT_P ABSOLUTE ACCESS ACTION ADD AFTER
+%token <keyword> ABORT_P ABSOLUTE_P ACCESS ACTION ADD AFTER
AGGREGATE ALL ALTER ANALYSE ANALYZE AND ANY ARRAY AS ASC
ASSERTION ASSIGNMENT AT AUTHORIZATION
BACKWARD BEFORE BEGIN_P BETWEEN BIGINT BINARY BIT
- BOOLEAN BOTH BY
+ BOOLEAN_P BOTH BY
CACHE CALLED CASCADE CASE CAST CHAIN CHAR_P
CHARACTER CHARACTERISTICS CHECK CHECKPOINT CLASS CLOSE
@@ -336,9 +336,9 @@ static void doNegateFloat(Value *v);
CREATEUSER CROSS CURRENT_DATE CURRENT_TIME
CURRENT_TIMESTAMP CURRENT_USER CURSOR CYCLE
- DATABASE DAY_P DEALLOCATE DEC DECIMAL DECLARE DEFAULT
+ DATABASE DAY_P DEALLOCATE DEC DECIMAL_P DECLARE DEFAULT
DEFERRABLE DEFERRED DEFINER DELETE_P DELIMITER DELIMITERS
- DESC DISTINCT DO DOMAIN_P DOUBLE DROP
+ DESC DISTINCT DO DOMAIN_P DOUBLE_P DROP
EACH ELSE ENCODING ENCRYPTED END_P ESCAPE EXCEPT
EXCLUSIVE EXECUTE EXISTS EXPLAIN EXTERNAL EXTRACT
@@ -351,8 +351,8 @@ static void doNegateFloat(Value *v);
HANDLER HAVING HOLD HOUR_P
ILIKE IMMEDIATE IMMUTABLE IMPLICIT_P IN_P INCREMENT
- INDEX INHERITS INITIALLY INNER_P INOUT INPUT
- INSENSITIVE INSERT INSTEAD INT INTEGER INTERSECT
+ INDEX INHERITS INITIALLY INNER_P INOUT INPUT_P
+ INSENSITIVE INSERT INSTEAD INT_P INTEGER INTERSECT
INTERVAL INTO INVOKER IS ISNULL ISOLATION
JOIN
@@ -373,18 +373,17 @@ static void doNegateFloat(Value *v);
ORDER OUT_P OUTER_P OVERLAPS OVERLAY OWNER
PARTIAL PASSWORD PATH_P PENDANT PLACING POSITION
- PRECISION PRESERVE PREPARE PRIMARY PRIOR PRIVILEGES PROCEDURAL
- PROCEDURE
+ PRECISION PRESERVE PREPARE PRIMARY
+ PRIOR PRIVILEGES PROCEDURAL PROCEDURE
- READ REAL RECHECK REFERENCES REINDEX RELATIVE RENAME REPLACE
+ READ REAL RECHECK REFERENCES REINDEX RELATIVE_P RENAME REPLACE
RESET RESTART RESTRICT RETURNS REVOKE RIGHT ROLLBACK ROW ROWS
RULE
SCHEMA SCROLL SECOND_P SECURITY SELECT SEQUENCE
SERIALIZABLE SESSION SESSION_USER SET SETOF SHARE
SHOW SIMILAR SIMPLE SMALLINT SOME STABLE START STATEMENT
- STATISTICS STDIN STDOUT STORAGE STRICT SUBSTRING
- SYSID
+ STATISTICS STDIN STDOUT STORAGE STRICT_P SUBSTRING SYSID
TABLE TEMP TEMPLATE TEMPORARY THEN TIME TIMESTAMP
TO TOAST TRAILING TRANSACTION TREAT TRIGGER TRIM TRUE_P
@@ -2675,14 +2674,14 @@ fetch_direction:
n->howMany = -1;
$$ = (Node *)n;
}
- | ABSOLUTE fetch_count
+ | ABSOLUTE_P fetch_count
{
FetchStmt *n = makeNode(FetchStmt);
n->direction = FETCH_ABSOLUTE;
n->howMany = $2;
$$ = (Node *)n;
}
- | RELATIVE fetch_count
+ | RELATIVE_P fetch_count
{
FetchStmt *n = makeNode(FetchStmt);
n->direction = FETCH_RELATIVE;
@@ -3146,15 +3145,15 @@ createfunc_opt_item:
{
$$ = makeDefElem("volatility", (Node *)makeString("volatile"));
}
- | CALLED ON NULL_P INPUT
+ | CALLED ON NULL_P INPUT_P
{
$$ = makeDefElem("strict", (Node *)makeInteger(FALSE));
}
- | RETURNS NULL_P ON NULL_P INPUT
+ | RETURNS NULL_P ON NULL_P INPUT_P
{
$$ = makeDefElem("strict", (Node *)makeInteger(TRUE));
}
- | STRICT
+ | STRICT_P
{
$$ = makeDefElem("strict", (Node *)makeInteger(TRUE));
}
@@ -5077,7 +5076,7 @@ GenericType:
* Provide real DECIMAL() and NUMERIC() implementations now - Jan 1998-12-30
* - thomas 1997-09-18
*/
-Numeric: INT
+Numeric: INT_P
{
$$ = SystemTypeName("int4");
}
@@ -5101,11 +5100,11 @@ Numeric: INT
{
$$ = $2;
}
- | DOUBLE PRECISION
+ | DOUBLE_P PRECISION
{
$$ = SystemTypeName("float8");
}
- | DECIMAL opt_decimal
+ | DECIMAL_P opt_decimal
{
$$ = SystemTypeName("numeric");
$$->typmod = $2;
@@ -5120,7 +5119,7 @@ Numeric: INT
$$ = SystemTypeName("numeric");
$$->typmod = $2;
}
- | BOOLEAN
+ | BOOLEAN_P
{
$$ = SystemTypeName("bool");
}
@@ -7179,7 +7178,7 @@ ColLabel: IDENT { $$ = $1; }
*/
unreserved_keyword:
ABORT_P
- | ABSOLUTE
+ | ABSOLUTE_P
| ACCESS
| ACTION
| ADD
@@ -7222,7 +7221,7 @@ unreserved_keyword:
| DELIMITER
| DELIMITERS
| DOMAIN_P
- | DOUBLE
+ | DOUBLE_P
| DROP
| EACH
| ENCODING
@@ -7248,7 +7247,7 @@ unreserved_keyword:
| INDEX
| INHERITS
| INOUT
- | INPUT
+ | INPUT_P
| INSENSITIVE
| INSERT
| INSTEAD
@@ -7299,7 +7298,7 @@ unreserved_keyword:
| READ
| RECHECK
| REINDEX
- | RELATIVE
+ | RELATIVE_P
| RENAME
| REPLACE
| RESET
@@ -7328,8 +7327,8 @@ unreserved_keyword:
| STDIN
| STDOUT
| STORAGE
- | STRICT
| SYSID
+ | STRICT_P
| TEMP
| TEMPLATE
| TEMPORARY
@@ -7374,17 +7373,17 @@ unreserved_keyword:
col_name_keyword:
BIGINT
| BIT
- | BOOLEAN
+ | BOOLEAN_P
| CHAR_P
| CHARACTER
| COALESCE
| CONVERT
| DEC
- | DECIMAL
+ | DECIMAL_P
| EXISTS
| EXTRACT
| FLOAT_P
- | INT
+ | INT_P
| INTEGER
| INTERVAL
| NCHAR
diff --git a/src/backend/parser/keywords.c b/src/backend/parser/keywords.c
index 2bee083287e..b035a828f32 100644
--- a/src/backend/parser/keywords.c
+++ b/src/backend/parser/keywords.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.138 2003/04/08 23:20:02 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.139 2003/05/15 16:35:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,7 @@
static const ScanKeyword ScanKeywords[] = {
/* name, value */
{"abort", ABORT_P},
- {"absolute", ABSOLUTE},
+ {"absolute", ABSOLUTE_P},
{"access", ACCESS},
{"action", ACTION},
{"add", ADD},
@@ -57,7 +57,7 @@ static const ScanKeyword ScanKeywords[] = {
{"bigint", BIGINT},
{"binary", BINARY},
{"bit", BIT},
- {"boolean", BOOLEAN},
+ {"boolean", BOOLEAN_P},
{"both", BOTH},
{"by", BY},
{"cache", CACHE},
@@ -99,7 +99,7 @@ static const ScanKeyword ScanKeywords[] = {
{"day", DAY_P},
{"deallocate", DEALLOCATE},
{"dec", DEC},
- {"decimal", DECIMAL},
+ {"decimal", DECIMAL_P},
{"declare", DECLARE},
{"default", DEFAULT},
{"deferrable", DEFERRABLE},
@@ -112,7 +112,7 @@ static const ScanKeyword ScanKeywords[] = {
{"distinct", DISTINCT},
{"do", DO},
{"domain", DOMAIN_P},
- {"double", DOUBLE},
+ {"double", DOUBLE_P},
{"drop", DROP},
{"each", EACH},
{"else", ELSE},
@@ -157,11 +157,11 @@ static const ScanKeyword ScanKeywords[] = {
{"initially", INITIALLY},
{"inner", INNER_P},
{"inout", INOUT},
- {"input", INPUT},
+ {"input", INPUT_P},
{"insensitive", INSENSITIVE},
{"insert", INSERT},
{"instead", INSTEAD},
- {"int", INT},
+ {"int", INT_P},
{"integer", INTEGER},
{"intersect", INTERSECT},
{"interval", INTERVAL},
@@ -246,7 +246,7 @@ static const ScanKeyword ScanKeywords[] = {
{"recheck", RECHECK},
{"references", REFERENCES},
{"reindex", REINDEX},
- {"relative", RELATIVE},
+ {"relative", RELATIVE_P},
{"rename", RENAME},
{"replace", REPLACE},
{"reset", RESET},
@@ -283,7 +283,7 @@ static const ScanKeyword ScanKeywords[] = {
{"stdin", STDIN},
{"stdout", STDOUT},
{"storage", STORAGE},
- {"strict", STRICT},
+ {"strict", STRICT_P},
{"substring", SUBSTRING},
{"sysid", SYSID},
{"table", TABLE},