mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Use correct DatumGet*() function in test_shm_mq_main().
This is purely cosmetic, as dsm_attach() interprets its argument as
a dsm_handle (i.e., an unsigned integer), but we might as well fix
it.
Oversight in commit 4db3744f1f.
Author: Jianghua Yang <yjhjstz@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAAZLFmRxkUD5jRs0W3K%3DUe4_ZS%2BRcAb0PCE1S0vVJBn3sWH2UQ%40mail.gmail.com
Backpatch-through: 13
			
			
This commit is contained in:
		@@ -77,7 +77,7 @@ test_shm_mq_main(Datum main_arg)
 | 
				
			|||||||
	 * exit, which is fine.  If there were a ResourceOwner, it would acquire
 | 
						 * exit, which is fine.  If there were a ResourceOwner, it would acquire
 | 
				
			||||||
	 * ownership of the mapping, but we have no need for that.
 | 
						 * ownership of the mapping, but we have no need for that.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	seg = dsm_attach(DatumGetInt32(main_arg));
 | 
						seg = dsm_attach(DatumGetUInt32(main_arg));
 | 
				
			||||||
	if (seg == NULL)
 | 
						if (seg == NULL)
 | 
				
			||||||
		ereport(ERROR,
 | 
							ereport(ERROR,
 | 
				
			||||||
				(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
 | 
									(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user