@@ -163,8 +163,8 @@ GetSharedSecurityLabel(const ObjectAddress *object, const char *provider)
163163 ObjectIdGetDatum (object -> classId ));
164164 ScanKeyInit (& keys [2 ],
165165 Anum_pg_shseclabel_provider ,
166- BTEqualStrategyNumber , F_NAMEEQ ,
167- CStringGetDatum (provider ));
166+ BTEqualStrategyNumber , F_TEXTEQ ,
167+ CStringGetTextDatum (provider ));
168168
169169 pg_shseclabel = heap_open (SharedSecLabelRelationId , AccessShareLock );
170170
@@ -220,8 +220,8 @@ GetSecurityLabel(const ObjectAddress *object, const char *provider)
220220 Int32GetDatum (object -> objectSubId ));
221221 ScanKeyInit (& keys [3 ],
222222 Anum_pg_seclabel_provider ,
223- BTEqualStrategyNumber , F_NAMEEQ ,
224- CStringGetDatum (provider ));
223+ BTEqualStrategyNumber , F_TEXTEQ ,
224+ CStringGetTextDatum (provider ));
225225
226226 pg_seclabel = heap_open (SecLabelRelationId , AccessShareLock );
227227
@@ -256,7 +256,6 @@ SetSharedSecurityLabel(const ObjectAddress *object,
256256 SysScanDesc scan ;
257257 HeapTuple oldtup ;
258258 HeapTuple newtup = NULL ;
259- NameData providername ;
260259 Datum values [Natts_pg_shseclabel ];
261260 bool nulls [Natts_pg_shseclabel ];
262261 bool replaces [Natts_pg_shseclabel ];
@@ -266,8 +265,7 @@ SetSharedSecurityLabel(const ObjectAddress *object,
266265 memset (replaces , false, sizeof (replaces ));
267266 values [Anum_pg_shseclabel_objoid - 1 ] = ObjectIdGetDatum (object -> objectId );
268267 values [Anum_pg_shseclabel_classoid - 1 ] = ObjectIdGetDatum (object -> classId );
269- namestrcpy (& providername , provider );
270- values [Anum_pg_shseclabel_provider - 1 ] = NameGetDatum (& providername );
268+ values [Anum_pg_shseclabel_provider - 1 ] = CStringGetTextDatum (provider );
271269 if (label != NULL )
272270 values [Anum_pg_shseclabel_label - 1 ] = CStringGetTextDatum (label );
273271
@@ -282,8 +280,8 @@ SetSharedSecurityLabel(const ObjectAddress *object,
282280 ObjectIdGetDatum (object -> classId ));
283281 ScanKeyInit (& keys [2 ],
284282 Anum_pg_shseclabel_provider ,
285- BTEqualStrategyNumber , F_NAMEEQ ,
286- CStringGetDatum (provider ));
283+ BTEqualStrategyNumber , F_TEXTEQ ,
284+ CStringGetTextDatum (provider ));
287285
288286 pg_shseclabel = heap_open (SharedSecLabelRelationId , RowExclusiveLock );
289287
@@ -337,7 +335,6 @@ SetSecurityLabel(const ObjectAddress *object,
337335 SysScanDesc scan ;
338336 HeapTuple oldtup ;
339337 HeapTuple newtup = NULL ;
340- NameData providername ;
341338 Datum values [Natts_pg_seclabel ];
342339 bool nulls [Natts_pg_seclabel ];
343340 bool replaces [Natts_pg_seclabel ];
@@ -355,8 +352,7 @@ SetSecurityLabel(const ObjectAddress *object,
355352 values [Anum_pg_seclabel_objoid - 1 ] = ObjectIdGetDatum (object -> objectId );
356353 values [Anum_pg_seclabel_classoid - 1 ] = ObjectIdGetDatum (object -> classId );
357354 values [Anum_pg_seclabel_objsubid - 1 ] = Int32GetDatum (object -> objectSubId );
358- namestrcpy (& providername , provider );
359- values [Anum_pg_seclabel_provider - 1 ] = NameGetDatum (& providername );
355+ values [Anum_pg_seclabel_provider - 1 ] = CStringGetTextDatum (provider );
360356 if (label != NULL )
361357 values [Anum_pg_seclabel_label - 1 ] = CStringGetTextDatum (label );
362358
@@ -375,8 +371,8 @@ SetSecurityLabel(const ObjectAddress *object,
375371 Int32GetDatum (object -> objectSubId ));
376372 ScanKeyInit (& keys [3 ],
377373 Anum_pg_seclabel_provider ,
378- BTEqualStrategyNumber , F_NAMEEQ ,
379- CStringGetDatum (provider ));
374+ BTEqualStrategyNumber , F_TEXTEQ ,
375+ CStringGetTextDatum (provider ));
380376
381377 pg_seclabel = heap_open (SecLabelRelationId , RowExclusiveLock );
382378
0 commit comments