R: Authentication in batch processing

Поиск
Список
Период
Сортировка
От Stefano Coletta
Тема R: Authentication in batch processing
Дата
Msg-id 350E062B37CE88409BB2489A029853266D2D12@POSTINO.intranet.xmedia.net
обсуждение исходный текст
Список pgsql-admin
Hi there,

I've got the same problem after upgrading from pgsql 7.1.2... My dump
scripts weren't working no more.
I've solved the problem modifying the source code and recompiling
postgres.

I've simply commented out the /dev/tty fopen and re-enabled the
stdin/stdout by default.

The modified source file is: src/bin/psql/common.c

This is the original code:

        termin = fopen("/dev/tty", "r");
        termout = fopen("/dev/tty", "w");
        if (!termin || !termout)
        {
                if (termin)
                        fclose(termin);
                if (termout)
                        fclose(termout);
                termin = stdin;
                termout = stderr;
        }

This is the patched code:

/*
        termin = fopen("/dev/tty", "r");
        termout = fopen("/dev/tty", "w");
        if (!termin || !termout)
        {
                if (termin)
                        fclose(termin);
                if (termout)
                        fclose(termout);*/
                termin = stdin;
                termout = stderr;
/*      }*/

Hope it helps for the moment while waiting for version 7.3

--------------------------------------------------
                   xmedia
           New Media Agency
--------------------------------------------------
Stefano Coletta <mailto:coletta@xmedia.net>
Network Admin <http://www.xmedia.net>
via Francesco Benaglia, 13 - Tel. +39 06 588851
00153 Roma Italy fax +39 06 58885016
--------------------------------------------------

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> Sent: tuesday 4 july 2002 18.16
> To: Alfred Anzlovar
> Cc: Alfred Anzlovar; pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Authentication in batch processing
>
>
> Alfred Anzlovar wrote:
> > On Thu, 4 Jul 2002, Bruce Momjian wrote:
> >
> > > How about PGUSER/PGPASSWORD?  That will work.  This is
> assuming you
> > > don't have an OS (BSD?) that displays environment variables for a
> > > process.
> >
> > No BSD, Linux. And it works. Thanks.
> >
> > Well, I must admit we had some rain today, but after your
> answer sun
> > came
> > from behind the clouds :)
> >
> > More thanks and greetings from the Sunny side of the Alps. Alfred
> > Anzlovar
>
> 7.3 may remove PGPASSWORD, I think, and instead allow you to
> specify a file that contains the password.
>
> > PS
> > Is it ok to send e-mail to pgsql-admin@postgresql.org AND TO you?
>
> Yes, of course.
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill,
> Pennsylvania 19026
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
http://archives.postgresql.org





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

Предыдущее
От: John Moore
Дата:
Сообщение: Performance impact of record sizes
Следующее
От: Shaun Thomas
Дата:
Сообщение: Re: Performance impact of record sizes