@@ -554,7 +554,7 @@ RestoreArchive(Archive *AHX)
554
554
*/
555
555
if (strncmp (te -> desc , "BLOB" , 4 ) == 0 )
556
556
{
557
- DropBlobIfExists (AH , te -> catalogId .oid );
557
+ DropLOIfExists (AH , te -> catalogId .oid );
558
558
}
559
559
else
560
560
{
@@ -1224,44 +1224,44 @@ PrintTOCSummary(Archive *AHX)
1224
1224
}
1225
1225
1226
1226
/***********
1227
- * BLOB Archival
1227
+ * Large Object Archival
1228
1228
***********/
1229
1229
1230
- /* Called by a dumper to signal start of a BLOB */
1230
+ /* Called by a dumper to signal start of a LO */
1231
1231
int
1232
- StartBlob (Archive * AHX , Oid oid )
1232
+ StartLO (Archive * AHX , Oid oid )
1233
1233
{
1234
1234
ArchiveHandle * AH = (ArchiveHandle * ) AHX ;
1235
1235
1236
- if (!AH -> StartBlobPtr )
1236
+ if (!AH -> StartLOPtr )
1237
1237
pg_fatal ("large-object output not supported in chosen format" );
1238
1238
1239
- AH -> StartBlobPtr (AH , AH -> currToc , oid );
1239
+ AH -> StartLOPtr (AH , AH -> currToc , oid );
1240
1240
1241
1241
return 1 ;
1242
1242
}
1243
1243
1244
- /* Called by a dumper to signal end of a BLOB */
1244
+ /* Called by a dumper to signal end of a LO */
1245
1245
int
1246
- EndBlob (Archive * AHX , Oid oid )
1246
+ EndLO (Archive * AHX , Oid oid )
1247
1247
{
1248
1248
ArchiveHandle * AH = (ArchiveHandle * ) AHX ;
1249
1249
1250
- if (AH -> EndBlobPtr )
1251
- AH -> EndBlobPtr (AH , AH -> currToc , oid );
1250
+ if (AH -> EndLOPtr )
1251
+ AH -> EndLOPtr (AH , AH -> currToc , oid );
1252
1252
1253
1253
return 1 ;
1254
1254
}
1255
1255
1256
1256
/**********
1257
- * BLOB Restoration
1257
+ * Large Object Restoration
1258
1258
**********/
1259
1259
1260
1260
/*
1261
- * Called by a format handler before any blobs are restored
1261
+ * Called by a format handler before any LOs are restored
1262
1262
*/
1263
1263
void
1264
- StartRestoreBlobs (ArchiveHandle * AH )
1264
+ StartRestoreLOs (ArchiveHandle * AH )
1265
1265
{
1266
1266
RestoreOptions * ropt = AH -> public .ropt ;
1267
1267
@@ -1273,14 +1273,14 @@ StartRestoreBlobs(ArchiveHandle *AH)
1273
1273
ahprintf (AH , "BEGIN;\n\n" );
1274
1274
}
1275
1275
1276
- AH -> blobCount = 0 ;
1276
+ AH -> loCount = 0 ;
1277
1277
}
1278
1278
1279
1279
/*
1280
- * Called by a format handler after all blobs are restored
1280
+ * Called by a format handler after all LOs are restored
1281
1281
*/
1282
1282
void
1283
- EndRestoreBlobs (ArchiveHandle * AH )
1283
+ EndRestoreLOs (ArchiveHandle * AH )
1284
1284
{
1285
1285
RestoreOptions * ropt = AH -> public .ropt ;
1286
1286
@@ -1294,34 +1294,34 @@ EndRestoreBlobs(ArchiveHandle *AH)
1294
1294
1295
1295
pg_log_info (ngettext ("restored %d large object" ,
1296
1296
"restored %d large objects" ,
1297
- AH -> blobCount ),
1298
- AH -> blobCount );
1297
+ AH -> loCount ),
1298
+ AH -> loCount );
1299
1299
}
1300
1300
1301
1301
1302
1302
/*
1303
- * Called by a format handler to initiate restoration of a blob
1303
+ * Called by a format handler to initiate restoration of a LO
1304
1304
*/
1305
1305
void
1306
- StartRestoreBlob (ArchiveHandle * AH , Oid oid , bool drop )
1306
+ StartRestoreLO (ArchiveHandle * AH , Oid oid , bool drop )
1307
1307
{
1308
- bool old_blob_style = (AH -> version < K_VERS_1_12 );
1308
+ bool old_lo_style = (AH -> version < K_VERS_1_12 );
1309
1309
Oid loOid ;
1310
1310
1311
- AH -> blobCount ++ ;
1311
+ AH -> loCount ++ ;
1312
1312
1313
1313
/* Initialize the LO Buffer */
1314
1314
AH -> lo_buf_used = 0 ;
1315
1315
1316
1316
pg_log_info ("restoring large object with OID %u" , oid );
1317
1317
1318
1318
/* With an old archive we must do drop and create logic here */
1319
- if (old_blob_style && drop )
1320
- DropBlobIfExists (AH , oid );
1319
+ if (old_lo_style && drop )
1320
+ DropLOIfExists (AH , oid );
1321
1321
1322
1322
if (AH -> connection )
1323
1323
{
1324
- if (old_blob_style )
1324
+ if (old_lo_style )
1325
1325
{
1326
1326
loOid = lo_create (AH -> connection , oid );
1327
1327
if (loOid == 0 || loOid != oid )
@@ -1335,27 +1335,27 @@ StartRestoreBlob(ArchiveHandle *AH, Oid oid, bool drop)
1335
1335
}
1336
1336
else
1337
1337
{
1338
- if (old_blob_style )
1338
+ if (old_lo_style )
1339
1339
ahprintf (AH , "SELECT pg_catalog.lo_open(pg_catalog.lo_create('%u'), %d);\n" ,
1340
1340
oid , INV_WRITE );
1341
1341
else
1342
1342
ahprintf (AH , "SELECT pg_catalog.lo_open('%u', %d);\n" ,
1343
1343
oid , INV_WRITE );
1344
1344
}
1345
1345
1346
- AH -> writingBlob = 1 ;
1346
+ AH -> writingLO = true ;
1347
1347
}
1348
1348
1349
1349
void
1350
- EndRestoreBlob (ArchiveHandle * AH , Oid oid )
1350
+ EndRestoreLO (ArchiveHandle * AH , Oid oid )
1351
1351
{
1352
1352
if (AH -> lo_buf_used > 0 )
1353
1353
{
1354
1354
/* Write remaining bytes from the LO buffer */
1355
1355
dump_lo_buf (AH );
1356
1356
}
1357
1357
1358
- AH -> writingBlob = 0 ;
1358
+ AH -> writingLO = false ;
1359
1359
1360
1360
if (AH -> connection )
1361
1361
{
@@ -1645,7 +1645,7 @@ RestoringToDB(ArchiveHandle *AH)
1645
1645
}
1646
1646
1647
1647
/*
1648
- * Dump the current contents of the LO data buffer while writing a BLOB
1648
+ * Dump the current contents of the LO data buffer while writing a LO
1649
1649
*/
1650
1650
static void
1651
1651
dump_lo_buf (ArchiveHandle * AH )
@@ -1673,10 +1673,10 @@ dump_lo_buf(ArchiveHandle *AH)
1673
1673
AH -> lo_buf_used ,
1674
1674
AH );
1675
1675
1676
- /* Hack: turn off writingBlob so ahwrite doesn't recurse to here */
1677
- AH -> writingBlob = 0 ;
1676
+ /* Hack: turn off writingLO so ahwrite doesn't recurse to here */
1677
+ AH -> writingLO = false ;
1678
1678
ahprintf (AH , "SELECT pg_catalog.lowrite(0, %s);\n" , buf -> data );
1679
- AH -> writingBlob = 1 ;
1679
+ AH -> writingLO = true ;
1680
1680
1681
1681
destroyPQExpBuffer (buf );
1682
1682
}
@@ -1695,7 +1695,7 @@ ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH)
1695
1695
{
1696
1696
int bytes_written = 0 ;
1697
1697
1698
- if (AH -> writingBlob )
1698
+ if (AH -> writingLO )
1699
1699
{
1700
1700
size_t remaining = size * nmemb ;
1701
1701
@@ -2324,7 +2324,7 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt,
2324
2324
}
2325
2325
2326
2326
/*
2327
- * Write out all data (tables & blobs )
2327
+ * Write out all data (tables & LOs )
2328
2328
*/
2329
2329
void
2330
2330
WriteDataChunks (ArchiveHandle * AH , ParallelState * pstate )
@@ -2418,8 +2418,8 @@ WriteDataChunksForTocEntry(ArchiveHandle *AH, TocEntry *te)
2418
2418
2419
2419
if (strcmp (te -> desc , "BLOBS" ) == 0 )
2420
2420
{
2421
- startPtr = AH -> StartBlobsPtr ;
2422
- endPtr = AH -> EndBlobsPtr ;
2421
+ startPtr = AH -> StartLOsPtr ;
2422
+ endPtr = AH -> EndLOsPtr ;
2423
2423
}
2424
2424
else
2425
2425
{
@@ -2965,7 +2965,7 @@ _tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH)
2965
2965
if (!te -> hadDumper )
2966
2966
{
2967
2967
/*
2968
- * Special Case: If 'SEQUENCE SET' or anything to do with BLOBs , then
2968
+ * Special Case: If 'SEQUENCE SET' or anything to do with LOs , then
2969
2969
* it is considered a data entry. We don't need to check for the
2970
2970
* BLOBS entry or old-style BLOB COMMENTS, because they will have
2971
2971
* hadDumper = true ... but we do need to check new-style BLOB ACLs,
@@ -3451,7 +3451,7 @@ _getObjectDescription(PQExpBuffer buf, const TocEntry *te)
3451
3451
appendPQExpBuffer (buf , "%s." , fmtId (te -> namespace ));
3452
3452
appendPQExpBufferStr (buf , fmtId (te -> tag ));
3453
3453
}
3454
- /* BLOBs just have a name, but it's numeric so must not use fmtId */
3454
+ /* LOs just have a name, but it's numeric so must not use fmtId */
3455
3455
else if (strcmp (type , "BLOB" ) == 0 )
3456
3456
{
3457
3457
appendPQExpBuffer (buf , "LARGE OBJECT %s" , te -> tag );
0 commit comments