aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/tab-complete.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2008-11-09 00:28:35 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2008-11-09 00:28:35 +0000
commitdf7641e25ab4da6f3a48222cbda0e121ccb32ad5 (patch)
tree29c33ccd2ff2a7b3c2abcd52cede74c79c4c56f7 /src/bin/psql/tab-complete.c
parenteec501c4f773add9f30789efc28f8ce3bf2e5de9 (diff)
downloadpostgresql-df7641e25ab4da6f3a48222cbda0e121ccb32ad5.tar.gz
postgresql-df7641e25ab4da6f3a48222cbda0e121ccb32ad5.zip
Add a new GUC variable called "IntervalStyle" that decouples interval output
from DateStyle, and create a new interval style that produces output matching the SQL standard (at least for interval values that fall within the standard's restrictions). IntervalStyle is also used to resolve the conflict between the standard and traditional Postgres rules for interpreting negative interval input. Ron Mayer
Diffstat (limited to 'src/bin/psql/tab-complete.c')
-rw-r--r--src/bin/psql/tab-complete.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 24e50d071d9..8c38aaf95bd 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.174 2008/11/07 18:25:07 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.175 2008/11/09 00:28:35 tgl Exp $
*/
/*----------------------------------------------------------------------
@@ -1956,6 +1956,13 @@ psql_completion(char *text, int start, int end)
COMPLETE_WITH_LIST(my_list);
}
+ else if (pg_strcasecmp(prev2_wd, "IntervalStyle") == 0)
+ {
+ static const char *const my_list[] =
+ {"postgres", "postgres_verbose", "sql_standard", NULL};
+
+ COMPLETE_WITH_LIST(my_list);
+ }
else if (pg_strcasecmp(prev2_wd, "GEQO") == 0)
{
static const char *const my_list[] =