On Wed, Jun 9, 2010 at 5:02 PM, Robert Haas <robertmh...@gmail.com> wrote: > I believe that the comment code is probably right, because I think > IConst can only handle values < 2^31, whereas OIDs can be as large as > 2^32-1.
I investigated this a little more and the above analysis turns out to be correct. ALTER LARGE OBJECT OWNER and GRANT ... ON LARGE OBJECT don't work for large objects outside the range of a signed integer. Session demonstrating the problem and proposed patch attached. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company
rhaas=# select lo_create('4000000000'); lo_create ------------ 4000000000 (1 row) rhaas=# comment on large object 4000000000 is 'big!'; COMMENT rhaas=# create user bob; CREATE ROLE rhaas=# grant all privileges on large object 4000000000 to bob; ERROR: syntax error at or near "4000000000" LINE 1: grant all privileges on large object 4000000000 to bob; ^ rhaas=# select lo_create('80000'); lo_create ----------- 80000 (1 row) rhaas=# grant all privileges on large object 80000 to bob; GRANT rhaas=# comment on large object 80000 is 'smaller'; COMMENT
lobjoidfix.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers