worries about funny characters.
-->
+Output of SHOW DATESTYLE is now in the same format accepted by SET DATESTYLE
PL/Python is now an untrusted language, and is renamed to 'plpythonu'
Dollar sign ($) is no longer allowed in operator names
Dollar sign ($) can be a non-first character in identifiers
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.79 2003/06/27 19:08:37 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.80 2003/07/15 19:19:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
newDateStyle = USE_SQL_DATES;
dcnt++;
}
- else if (strncasecmp(tok, "POSTGRESQL", 8) == 0)
+ else if (strncasecmp(tok, "POSTGRES", 8) == 0)
{
newDateStyle = USE_POSTGRES_DATES;
dcnt++;
strcpy(result, "SQL");
break;
case USE_GERMAN_DATES:
- strcpy(result, "GERMAN");
+ strcpy(result, "German");
break;
default:
- strcpy(result, "POSTGRESQL");
+ strcpy(result, "Postgres");
break;
}
- strcat(result, newEuroDates ? ", EURO" : ", US");
+ strcat(result, newEuroDates ? ", European" : ", US");
/*
* Finally, it's safe to assign to the global variables; the
return result;
}
-/*
- * show_datestyle: GUC show_hook for datestyle
- */
-const char *
-show_datestyle(void)
-{
- static char buf[64];
-
- switch (DateStyle)
- {
- case USE_ISO_DATES:
- strcpy(buf, "ISO");
- break;
- case USE_SQL_DATES:
- strcpy(buf, "SQL");
- break;
- case USE_GERMAN_DATES:
- strcpy(buf, "German");
- break;
- default:
- strcpy(buf, "Postgres");
- break;
- };
- strcat(buf, " with ");
- strcat(buf, ((EuroDates) ? "European" : "US (NonEuropean)"));
- strcat(buf, " conventions");
-
- return buf;
-}
-
/*
* TIMEZONE
* Written by Peter Eisentraut
.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.136 2003/07/09 08:51:19 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.137 2003/07/15 19:19:56 tgl Exp $
*
*--------------------------------------------------------------------
*/
GUC_LIST_INPUT | GUC_REPORT
},
&datestyle_string,
- "ISO, US", assign_datestyle, show_datestyle
+ "ISO, US", assign_datestyle, NULL
},
{
* variable.h
* Routines for handling specialized SET variables.
*
- * $Id: variable.h,v 1.20 2003/04/25 19:45:09 tgl Exp $
+ * $Id: variable.h,v 1.21 2003/07/15 19:19:56 tgl Exp $
*
*/
#ifndef VARIABLE_H
extern const char *assign_datestyle(const char *value,
bool doit, bool interactive);
-extern const char *show_datestyle(void);
extern const char *assign_timezone(const char *value,
bool doit, bool interactive);
extern const char *show_timezone(void);
--
SET DateStyle TO 'US,Postgres';
SHOW DateStyle;
- DateStyle
---------------------------------------------
- Postgres with US (NonEuropean) conventions
+ DateStyle
+--------------
+ Postgres, US
(1 row)
SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL;
SET DateStyle TO 'US,SQL';
SHOW DateStyle;
- DateStyle
----------------------------------------
- SQL with US (NonEuropean) conventions
+ DateStyle
+-----------
+ SQL, US
(1 row)
SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL;
SET DateStyle TO 'European,Postgres';
SHOW DateStyle;
- DateStyle
-------------------------------------
- Postgres with European conventions
+ DateStyle
+--------------------
+ Postgres, European
(1 row)
INSERT INTO TIMESTAMP_TBL VALUES('13/06/1957');
SET DateStyle TO 'European,ISO';
SHOW DateStyle;
- DateStyle
--------------------------------
- ISO with European conventions
+ DateStyle
+---------------
+ ISO, European
(1 row)
SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL;
SET DateStyle TO 'European,SQL';
SHOW DateStyle;
- DateStyle
--------------------------------
- SQL with European conventions
+ DateStyle
+---------------
+ SQL, European
(1 row)
SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL;
--
SET DateStyle TO 'US,Postgres';
SHOW DateStyle;
- DateStyle
---------------------------------------------
- Postgres with US (NonEuropean) conventions
+ DateStyle
+--------------
+ Postgres, US
(1 row)
SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL;
SET DateStyle TO 'US,SQL';
SHOW DateStyle;
- DateStyle
----------------------------------------
- SQL with US (NonEuropean) conventions
+ DateStyle
+-----------
+ SQL, US
(1 row)
SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL;
SET DateStyle TO 'European,Postgres';
SHOW DateStyle;
- DateStyle
-------------------------------------
- Postgres with European conventions
+ DateStyle
+--------------------
+ Postgres, European
(1 row)
INSERT INTO TIMESTAMP_TBL VALUES('13/06/1957');
SET DateStyle TO 'European,ISO';
SHOW DateStyle;
- DateStyle
--------------------------------
- ISO with European conventions
+ DateStyle
+---------------
+ ISO, European
(1 row)
SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL;
SET DateStyle TO 'European,SQL';
SHOW DateStyle;
- DateStyle
--------------------------------
- SQL with European conventions
+ DateStyle
+---------------
+ SQL, European
(1 row)
SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL;
--
SET DateStyle TO 'US,Postgres';
SHOW DateStyle;
- DateStyle
---------------------------------------------
- Postgres with US (NonEuropean) conventions
+ DateStyle
+--------------
+ Postgres, US
(1 row)
SELECT '' AS "64", d1 AS us_postgres FROM TIMESTAMP_TBL;
SET DateStyle TO 'US,SQL';
SHOW DateStyle;
- DateStyle
----------------------------------------
- SQL with US (NonEuropean) conventions
+ DateStyle
+-----------
+ SQL, US
(1 row)
SELECT '' AS "64", d1 AS us_sql FROM TIMESTAMP_TBL;
SET DateStyle TO 'European,Postgres';
SHOW DateStyle;
- DateStyle
-------------------------------------
- Postgres with European conventions
+ DateStyle
+--------------------
+ Postgres, European
(1 row)
INSERT INTO TIMESTAMP_TBL VALUES('13/06/1957');
SET DateStyle TO 'European,ISO';
SHOW DateStyle;
- DateStyle
--------------------------------
- ISO with European conventions
+ DateStyle
+---------------
+ ISO, European
(1 row)
SELECT '' AS "65", d1 AS european_iso FROM TIMESTAMP_TBL;
SET DateStyle TO 'European,SQL';
SHOW DateStyle;
- DateStyle
--------------------------------
- SQL with European conventions
+ DateStyle
+---------------
+ SQL, European
(1 row)
SELECT '' AS "65", d1 AS european_sql FROM TIMESTAMP_TBL;