psql's help
I see there are at least other two options for SET/SHOW/RESET commands:
- KSQO
- QUERY_LIMIT
I would to underline the help is not updated about KSQO:
hygea=> \h show
Command: show
Description: show current run-time environment
Syntax:
SHOW DateStyle|GEQO|R_PLANS|QUERY_LIMIT
hygea=> \h reset
Command: reset
Description: set run-time environment back to default
Syntax:
RESET DateStyle|GEQO|R_PLANS|QUERY_LIMIT
hygea=> \h set
Command: set
Description: set run-time environment
Syntax:
SET DateStyle TO
'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'
set GEQO TO 'ON[=#]'|'OFF'
set R_PLANS TO 'ON'| 'OFF'
set QUERY_LIMIT TO #
Jose'
I see there are at least other two options for SET/SHOW/RESET commands:
- KSQO
- QUERY_LIMITI would to underline the help is not updated about KSQO:
hygea=> \h show
Command: show
Description: show current run-time environment
Syntax:
SHOW DateStyle|GEQO|R_PLANS|QUERY_LIMIThygea=> \h reset
Command: reset
Description: set run-time environment back to default
Syntax:
RESET DateStyle|GEQO|R_PLANS|QUERY_LIMIThygea=> \h set
Command: set
Description: set run-time environment
Syntax:
SET DateStyle TO
'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'
set GEQO TO 'ON[=#]'|'OFF'
set R_PLANS TO 'ON'| 'OFF'
set QUERY_LIMIT TO #
This is because KQSO is a workaround, that may even be gone by 6.4
final.
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
SET DateStyle TO
'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'
set GEQO TO 'ON[=#]'|'OFF'
set R_PLANS TO 'ON'| 'OFF'
set QUERY_LIMIT TO #This is because KQSO is a workaround, that may even be gone by 6.4
final.
I hope the QUERY_LIMIT too.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck@debis.com (Jan Wieck) #
SET DateStyle TO
'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'
set GEQO TO 'ON[=#]'|'OFF'
set R_PLANS TO 'ON'| 'OFF'
set QUERY_LIMIT TO #This is because KQSO is a workaround, that may even be gone by 6.4
final.I hope the QUERY_LIMIT too.
I still have that cnfify() possible fix to review for KQSO. Are you
still thinking limit for 6.4 final, or a minor release after that?
--
Bruce Momjian | http://www.op.net/~candle
maillist@candle.pha.pa.us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
I hope the QUERY_LIMIT too.
I still have that cnfify() possible fix to review for KQSO. Are you
still thinking limit for 6.4 final, or a minor release after that?
I posted the part that is the minimum applied to 6.4 to make
adding LIMIT later non-initdb earlier. Anyway, here it's
again.
My LIMIT implementation that does it like the SET in the
toplevel executor (but via parsetree values) is ready for
production. I only held it back because it's feature, not
bugfix.
Do you want it in 6.4 final?
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck@debis.com (Jan Wieck) #
diff -cr src.orig/backend/nodes/copyfuncs.c src/backend/nodes/copyfuncs.c
*** src.orig/backend/nodes/copyfuncs.c Fri Oct 16 11:53:40 1998
--- src/backend/nodes/copyfuncs.c Fri Oct 16 13:32:35 1998
***************
*** 1578,1583 ****
--- 1578,1586 ----
newnode->unionClause = temp_list;
}
+ Node_Copy(from, newnode, limitOffset);
+ Node_Copy(from, newnode, limitCount);
+
return newnode;
}
diff -cr src.orig/backend/nodes/outfuncs.c src/backend/nodes/outfuncs.c
*** src.orig/backend/nodes/outfuncs.c Fri Oct 16 11:53:40 1998
--- src/backend/nodes/outfuncs.c Fri Oct 16 13:30:50 1998
***************
*** 259,264 ****
--- 259,268 ----
appendStringInfo(str, (node->hasSubLinks ? "true" : "false"));
appendStringInfo(str, " :unionClause ");
_outNode(str, node->unionClause);
+ appendStringInfo(str, " :limitOffset ");
+ _outNode(str, node->limitOffset);
+ appendStringInfo(str, " :limitCount ");
+ _outNode(str, node->limitCount);
}
static void
diff -cr src.orig/backend/nodes/readfuncs.c src/backend/nodes/readfuncs.c
*** src.orig/backend/nodes/readfuncs.c Fri Oct 16 11:53:40 1998
--- src/backend/nodes/readfuncs.c Fri Oct 16 13:31:43 1998
***************
*** 163,168 ****
--- 163,174 ----
token = lsptok(NULL, &length); /* skip :unionClause */
local_node->unionClause = nodeRead(true);
+ token = lsptok(NULL, &length); /* skip :limitOffset */
+ local_node->limitOffset = nodeRead(true);
+
+ token = lsptok(NULL, &length); /* skip :limitCount */
+ local_node->limitCount = nodeRead(true);
+
return local_node;
}
diff -cr src.orig/include/nodes/parsenodes.h src/include/nodes/parsenodes.h
*** src.orig/include/nodes/parsenodes.h Fri Oct 16 11:53:58 1998
--- src/include/nodes/parsenodes.h Fri Oct 16 13:35:32 1998
***************
*** 60,65 ****
--- 60,67 ----
List *unionClause; /* unions are linked under the previous
* query */
+ Node *limitOffset; /* # of result tuples to skip */
+ Node *limitCount; /* # of result tuples to return */
/* internal to planner */
List *base_rel_list; /* base relation list */
***************
*** 639,644 ****
--- 641,648 ----
char *portalname; /* the portal (cursor) to create */
bool binary; /* a binary (internal) portal? */
bool unionall; /* union without unique sort */
+ Node *limitOffset; /* # of result tuples to skip */
+ Node *limitCount; /* # of result tuples to return */
} SelectStmt;