Re: [GENERAL] 6.5.1 pg_dump adds "connect as" line

Поиск
Список
Период
Сортировка
От Ross J. Reedstrom
Тема Re: [GENERAL] 6.5.1 pg_dump adds "connect as" line
Дата
Msg-id 19990828000342.A17199@wallace.ece.rice.edu
обсуждение исходный текст
Ответ на 6.5.1 pg_dump adds "connect as" line  (Ted Nolan SRI Augusta GA <ted@ags.ga.erg.sri.com>)
Ответы Re: [GENERAL] 6.5.1 pg_dump adds "connect as" line  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список pgsql-general
On Fri, Aug 27, 1999 at 10:34:58PM -0400, Ted Nolan SRI Augusta GA wrote:
> Folks,
>
> Just noticed this:  I did a pg_dump on a database I wanted to send to
> someone (from 6.5.1 on NT), and the dump file included a "connect as"
> line.
>
> This was bad, because we don't share a user namespace, and when he did
>
>     psql < dumpfile
>
> it died because my user did not exist on his machine.  (We used sed to
> edit it out and continue from there..)
>
> 6.5 on Solaris does not emit this line, and reloads on machines with
> different users work fine..
>
> Is this a bug, or a feature I don't understand?

New, poorly documented default of an old feature. It's always been
recommended that when using pg_dump for backup, the -z switch be used,
to dump ACLs (Access Control Lists) As of 6.5.1, this has been made the
default behavior. I call it poorly documented only because this bit me
as well recently, for the same reason, and the switch added to turn ACL
dumping off ( -x ) is not documented in the usage message. I went and
grovelled in the source to find it. Patch below:


--- pg_dump.c~  Mon Jul 26 10:43:34 1999
+++ pg_dump.c   Fri Aug 27 23:59:41 1999
@@ -160,7 +160,9 @@
        fprintf(stderr,
                        "\t -v          \t\t verbose\n");
        fprintf(stderr,
-                       "\t -z          \t\t dump ACLs (grant/revoke)\n");
+                       "\t -z          \t\t dump ACLs (grant/revoke) on by default\n");
+       fprintf(stderr,
+                       "\t -x          \t\t don't dump ACLs\n");
        fprintf(stderr,
                        "\nIf dbname is not supplied, then the DATABASE environment "
                        "variable value is used.\n");


--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005

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

Предыдущее
От: Ted Nolan SRI Augusta GA
Дата:
Сообщение: 6.5.1 pg_dump adds "connect as" line
Следующее
От: "Hub.Org News Admin"
Дата:
Сообщение: ...