|
> length(query->rtable) != 1);
> + context.prettyFlags = prettyFlags;
> + context.indentLevel = startIndent;
> +
> dpns.rtable = query->rtable;
> dpns.outer_varno = dpns.inner_varno = 0;
> dpns.outer_rte
y->limitCount != NULL)
{
! appendStringInfo(buf, " LIMIT ");
if (IsA(query->limitCount, Const) &&
((Const *) query->limitCount)->constisnull)
appendStringInfo(buf, "ALL");
--- 1691,1702 -
-PRETTYINDENT_STD,
PRETTYINDENT_STD, 0);
get_rule_expr(query->limitOffset, context, false);
}
if (query->limitCount != NULL)
{
! appendContextKeyword(context, " LIMIT ", -PRETTYINDENT_STD,
PRETTYINDENT_STD, 0);
se);
}
if (query->limitCount != NULL)
{
! appendStringInfo(buf, " LIMIT ");
if (IsA(query->limitCount, Const) &&
((Const *) query->limitCount)->constisnull)
appendStringInf
ery->limitOffset, context, false);
}
if (query->limitCount != NULL)
{
! appendStringInfo(buf, " LIMIT ");
if (IsA(query->limitCount, Const) &&
((Const *) query->limitCount)->constisnull)
NULL)
{
! appendStringInfo(buf, " OFFSET ");
get_rule_expr(query->limitOffset, context, false);
}
if (query->limitCount != NULL)
{
! appendStringInfo(buf, " LIMIT ");
if (IsA(que
ShareLock);
> --- 1563,1569
>
> ev_relation = heap_open(ev_class, AccessShareLock);
>
> ! get_query_def(query, buf, NIL, RelationGetDescr(ev_relation), prettyFlags, 0);
> appendStringInfo(buf, ";");
>
> heap_close(ev_relation, Acces
get_query_def(query, buf, NIL, RelationGetDescr(ev_relation), prettyFlags, 0);
> appendStringInfo(buf, ";");
>
> heap_close(ev_relation, AccessShareLock);
> ***
> *** 1506,1512
>*/
> static void
> get_query_def(Query *query, StringInfo buf, List *pare
limitOffset, context, false);
}
if (query->limitCount != NULL)
{
! appendStringInfo(buf, " LIMIT ");
if (IsA(query->limitCount, Const) &&
((Const *) query->limitCount)->constisnull)
appe
#x27;m content to just use the query string as sent by the user. I'll post
> a revised patch that does that soon.
Attached is the patch I applied to HEAD that uses the query string
supplied by the client, without any rewriting.
-Neil
===
:
- the query string in the view is produced by deparsing the parsetree
after the parse-analysis phase using adt/ruleutils (but before the
rewriter or planner have been invoked).
- two new columns: "parameter_types" is an array of oid that contains
the OIDs of the prepared statement
name
+ text
+
+ The name of the cursor
+
+
+
+ statement
+ text
+
+ The verbatim query string submitted to declare this cursor
+
+
+
+ is_holdable
+ boolean
+
+
+true if the cursor is holdable (that is, it
+can
References
+ Description
+
+
+
+
+
+ name
+ text
+
+ The name of the cursor.
+
+
+
+ statement
+ text
+
+ The verbatim query string submitted to declare this
cursor.
+
+
+
+ is_holdable
+
} DictSyn;
static char *
findwrd(char *in, char **end)
{
--- 31,45
typedef struct
{
! int len; /* length of syn array */
Syn *syn;
} DictSyn;
+ /*
+ * Finds the next whitespace-delimited word within the 'in' string.
+ * Returns a pointer to the
TA(insert OID = 2508 ( pg_get_constraintdef PGNSP PGUID 12 f f t f s 2 25 "26 16"
> pg_get_constraintdef - _null_ ));
> DESCR("constraint description with pretty-print option");
> DATA(insert OID = 2509 ( pg_get_exprPGNSP PGUID 12 f f t f s 3 25 "25
pg_get_indexdef - _null_ ));
> > DESCR("index description (full create statement or single expression) with
> > pretty-print option");
> > DATA(insert OID = 2508 ( pg_get_constraintdef PGNSP PGUID 12 f
-
- #define SYNBUFLEN 4096
-
typedef struct
{
char *in;
--- 20,25
***
*** 31,53
typedef struct
{
! int len;
Syn *syn;
} DictSyn;
static char *
findwrd(char *in, char **end)
{
char *start;
! *end = NULL;
while (*in && t_issp
17 matches
Mail list logo