mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	RelationBuildRuleLock(): char* --> Datum for ruleaction and
rule_evqual_string.
This commit is contained in:
		
							
								
								
									
										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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user