@@ -163,8 +163,8 @@ GetSharedSecurityLabel(const ObjectAddress *object, const char *provider)
163
163
ObjectIdGetDatum (object -> classId ));
164
164
ScanKeyInit (& keys [2 ],
165
165
Anum_pg_shseclabel_provider ,
166
- BTEqualStrategyNumber , F_NAMEEQ ,
167
- CStringGetDatum (provider ));
166
+ BTEqualStrategyNumber , F_TEXTEQ ,
167
+ CStringGetTextDatum (provider ));
168
168
169
169
pg_shseclabel = heap_open (SharedSecLabelRelationId , AccessShareLock );
170
170
@@ -220,8 +220,8 @@ GetSecurityLabel(const ObjectAddress *object, const char *provider)
220
220
Int32GetDatum (object -> objectSubId ));
221
221
ScanKeyInit (& keys [3 ],
222
222
Anum_pg_seclabel_provider ,
223
- BTEqualStrategyNumber , F_NAMEEQ ,
224
- CStringGetDatum (provider ));
223
+ BTEqualStrategyNumber , F_TEXTEQ ,
224
+ CStringGetTextDatum (provider ));
225
225
226
226
pg_seclabel = heap_open (SecLabelRelationId , AccessShareLock );
227
227
@@ -256,7 +256,6 @@ SetSharedSecurityLabel(const ObjectAddress *object,
256
256
SysScanDesc scan ;
257
257
HeapTuple oldtup ;
258
258
HeapTuple newtup = NULL ;
259
- NameData providername ;
260
259
Datum values [Natts_pg_shseclabel ];
261
260
bool nulls [Natts_pg_shseclabel ];
262
261
bool replaces [Natts_pg_shseclabel ];
@@ -266,8 +265,7 @@ SetSharedSecurityLabel(const ObjectAddress *object,
266
265
memset (replaces , false, sizeof (replaces ));
267
266
values [Anum_pg_shseclabel_objoid - 1 ] = ObjectIdGetDatum (object -> objectId );
268
267
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 );
271
269
if (label != NULL )
272
270
values [Anum_pg_shseclabel_label - 1 ] = CStringGetTextDatum (label );
273
271
@@ -282,8 +280,8 @@ SetSharedSecurityLabel(const ObjectAddress *object,
282
280
ObjectIdGetDatum (object -> classId ));
283
281
ScanKeyInit (& keys [2 ],
284
282
Anum_pg_shseclabel_provider ,
285
- BTEqualStrategyNumber , F_NAMEEQ ,
286
- CStringGetDatum (provider ));
283
+ BTEqualStrategyNumber , F_TEXTEQ ,
284
+ CStringGetTextDatum (provider ));
287
285
288
286
pg_shseclabel = heap_open (SharedSecLabelRelationId , RowExclusiveLock );
289
287
@@ -337,7 +335,6 @@ SetSecurityLabel(const ObjectAddress *object,
337
335
SysScanDesc scan ;
338
336
HeapTuple oldtup ;
339
337
HeapTuple newtup = NULL ;
340
- NameData providername ;
341
338
Datum values [Natts_pg_seclabel ];
342
339
bool nulls [Natts_pg_seclabel ];
343
340
bool replaces [Natts_pg_seclabel ];
@@ -355,8 +352,7 @@ SetSecurityLabel(const ObjectAddress *object,
355
352
values [Anum_pg_seclabel_objoid - 1 ] = ObjectIdGetDatum (object -> objectId );
356
353
values [Anum_pg_seclabel_classoid - 1 ] = ObjectIdGetDatum (object -> classId );
357
354
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 );
360
356
if (label != NULL )
361
357
values [Anum_pg_seclabel_label - 1 ] = CStringGetTextDatum (label );
362
358
@@ -375,8 +371,8 @@ SetSecurityLabel(const ObjectAddress *object,
375
371
Int32GetDatum (object -> objectSubId ));
376
372
ScanKeyInit (& keys [3 ],
377
373
Anum_pg_seclabel_provider ,
378
- BTEqualStrategyNumber , F_NAMEEQ ,
379
- CStringGetDatum (provider ));
374
+ BTEqualStrategyNumber , F_TEXTEQ ,
375
+ CStringGetTextDatum (provider ));
380
376
381
377
pg_seclabel = heap_open (SecLabelRelationId , RowExclusiveLock );
382
378
0 commit comments