|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/catalog/pg_largeobject.c,v 1.34 2009/12/11 03:34:55 itagaki Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/catalog/pg_largeobject.c,v 1.35 2009/12/21 01:34:10 rhaas Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -79,10 +79,8 @@ LargeObjectCreate(Oid loid)
|
79 | 79 | }
|
80 | 80 |
|
81 | 81 | /*
|
82 |
| - * Drop a large object having the given LO identifier. |
83 |
| - * |
84 |
| - * When we drop a large object, it is necessary to drop both of metadata |
85 |
| - * and data pages in same time. |
| 82 | + * Drop a large object having the given LO identifier. Both the data pages |
| 83 | + * and metadata must be dropped. |
86 | 84 | */
|
87 | 85 | void
|
88 | 86 | LargeObjectDrop(Oid loid)
|
@@ -191,13 +189,12 @@ LargeObjectAlterOwner(Oid loid, Oid newOwnerId)
|
191 | 189 | if (!superuser())
|
192 | 190 | {
|
193 | 191 | /*
|
194 |
| - * The 'lo_compat_privileges' is not checked here, because we |
195 |
| - * don't have any access control features in the 8.4.x series |
196 |
| - * or earlier release. |
197 |
| - * So, it is not a place we can define a compatible behavior. |
| 192 | + * lo_compat_privileges is not checked here, because ALTER |
| 193 | + * LARGE OBJECT ... OWNER did not exist at all prior to |
| 194 | + * PostgreSQL 8.5. |
| 195 | + * |
| 196 | + * We must be the owner of the existing object. |
198 | 197 | */
|
199 |
| - |
200 |
| - /* Otherwise, must be owner of the existing object */ |
201 | 198 | if (!pg_largeobject_ownercheck(loid, GetUserId()))
|
202 | 199 | ereport(ERROR,
|
203 | 200 | (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
|
@@ -251,9 +248,8 @@ LargeObjectAlterOwner(Oid loid, Oid newOwnerId)
|
251 | 248 | /*
|
252 | 249 | * LargeObjectExists
|
253 | 250 | *
|
254 |
| - * Currently, we don't use system cache to contain metadata of |
255 |
| - * large objects, because massive number of large objects can |
256 |
| - * consume not a small amount of process local memory. |
| 251 | + * We don't use the system cache to for large object metadata, for fear of |
| 252 | + * using too much local memory. |
257 | 253 | *
|
258 | 254 | * Note that LargeObjectExists always scans the system catalog
|
259 | 255 | * with SnapshotNow, so it is unavailable to use to check
|
|
0 commit comments