Commit a40a546e authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

RelationBuildRuleLock(): char* --> Datum for ruleaction and

rule_evqual_string.
parent b6bd3da5
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.23 1997/09/08 21:48:55 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.24 1997/09/12 06:57:04 vadim Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -740,8 +740,8 @@ RelationBuildRuleLock(Relation relation) ...@@ -740,8 +740,8 @@ RelationBuildRuleLock(Relation relation)
(Buffer *) NULL)) != NULL) (Buffer *) NULL)) != NULL)
{ {
bool isnull; bool isnull;
char *ruleaction = NULL; Datum ruleaction;
char *rule_evqual_string; Datum rule_evqual_string;
RewriteRule *rule; RewriteRule *rule;
rule = (RewriteRule *) palloc(sizeof(RewriteRule)); rule = (RewriteRule *) palloc(sizeof(RewriteRule));
...@@ -770,11 +770,11 @@ RelationBuildRuleLock(Relation relation) ...@@ -770,11 +770,11 @@ RelationBuildRuleLock(Relation relation)
Anum_pg_rewrite_ev_qual, pg_rewrite_tupdesc, Anum_pg_rewrite_ev_qual, pg_rewrite_tupdesc,
&isnull); &isnull);
ruleaction = textout((struct varlena *) ruleaction); ruleaction = PointerGetDatum (textout((struct varlena *) DatumGetPointer (ruleaction)));
rule_evqual_string = textout((struct varlena *) rule_evqual_string); rule_evqual_string = PointerGetDatum (textout((struct varlena *) DatumGetPointer (rule_evqual_string)));
rule->actions = (List *) stringToNode(ruleaction); rule->actions = (List *) stringToNode(DatumGetPointer (ruleaction));
rule->qual = (Node *) stringToNode(rule_evqual_string); rule->qual = (Node *) stringToNode(DatumGetPointer (rule_evqual_string));
rules[numlocks++] = rule; rules[numlocks++] = rule;
if (numlocks == maxlocks) if (numlocks == maxlocks)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment