mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-23 19:39:53 +08:00
RelationBuildRuleLock(): char* --> Datum for ruleaction and
rule_evqual_string.
This commit is contained in:
parent
b6bd3da520
commit
a40a546e47
14
src/backend/utils/cache/relcache.c
vendored
14
src/backend/utils/cache/relcache.c
vendored
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* 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)
|
||||
(Buffer *) NULL)) != NULL)
|
||||
{
|
||||
bool isnull;
|
||||
char *ruleaction = NULL;
|
||||
char *rule_evqual_string;
|
||||
Datum ruleaction;
|
||||
Datum rule_evqual_string;
|
||||
RewriteRule *rule;
|
||||
|
||||
rule = (RewriteRule *) palloc(sizeof(RewriteRule));
|
||||
@ -770,11 +770,11 @@ RelationBuildRuleLock(Relation relation)
|
||||
Anum_pg_rewrite_ev_qual, pg_rewrite_tupdesc,
|
||||
&isnull);
|
||||
|
||||
ruleaction = textout((struct varlena *) ruleaction);
|
||||
rule_evqual_string = textout((struct varlena *) rule_evqual_string);
|
||||
ruleaction = PointerGetDatum (textout((struct varlena *) DatumGetPointer (ruleaction)));
|
||||
rule_evqual_string = PointerGetDatum (textout((struct varlena *) DatumGetPointer (rule_evqual_string)));
|
||||
|
||||
rule->actions = (List *) stringToNode(ruleaction);
|
||||
rule->qual = (Node *) stringToNode(rule_evqual_string);
|
||||
rule->actions = (List *) stringToNode(DatumGetPointer (ruleaction));
|
||||
rule->qual = (Node *) stringToNode(DatumGetPointer (rule_evqual_string));
|
||||
|
||||
rules[numlocks++] = rule;
|
||||
if (numlocks == maxlocks)
|
||||
|
Loading…
Reference in New Issue
Block a user