Re: Permissions problem with sequences

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Permissions problem with sequences
Дата
Msg-id 24737.1094528508@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Permissions problem with sequences  ("Gary Doades" <gpd@gpdnet.co.uk>)
Ответы Re: Permissions problem with sequences  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-bugs
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>> Given that pg_dump does put out GRANT/REVOKE operations on the sequence,
>> it's certainly aware that the sequence exists.  I suspect this is just a
>> fixable bug (ie, suppression of output of the sequence CREATE command is
>> being done at the wrong place).

> I'm trying to think of the solution here.

One way is to allow the ArchiveEntry to be created (ie, suppress the
discrimination against owned sequences at pg_dump.c:7306) and instead
discriminate at the point of emitting the CREATE or DROP from the
ArchiveEntry ... but not when emitting an ALTER OWNER from it.

That does seem a bit ugly though.  What about emitting only an ACL
ArchiveEntry instead of a full ArchiveEntry for an owned sequence?

Actually ... given that pg_dump.c:7306 is suppressing the ArchiveEntry
... where the heck are the GRANT/REVOKE outputs coming from?  I thought
those were generated off an ArchiveEntry but apparently not.  It's too
late at night here for me to feel like tracking this down, but it seems
an important part of the puzzle.

Ultimately I think this one comes down to taste --- do what seems least
ugly ...

> Also, are there any other objects that are going to have this problem?
> Off the top of my head it's only serial sequences.

Can't think of any others ATM.  If more come up, we'll need to invent
some infrastructure to support it --- more fields in an ArchiveEntry,
say.  That is also a possible solution right now, but I'm not sure it's
worth the trouble as long as there's only one use-case.  Again it boils
down to your design taste ...

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCHES] [pgsql-hackers-win32] Win32 deadlock detection not working for Postgres8beta1
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1242: Major bug in pgSQL