| Lists: | pgadmin-supportpgsql-general |
|---|
| From: | "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com> |
|---|---|
| To: | <pgsql-general(at)postgresql(dot)org> |
| Subject: | pgpass.conf |
| Date: | 2007-07-10 07:47:21 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
Hello All,
I am trying tu run a script to create database from a batch programme and dont want to supply password everytime.
So i tried to setup pgpass.conf file.
File is kept in user profile/application data
i.e
C:\Documents and Settings\postgres\Application Data\postgresql\pgpass.conf
file contains:
localhost:5432 :*:postgres:mypass
localhost:5432:qsweb:qsweb:mypass1
Still the batch asks for the password.!!!
I am just not getting why its not reading password from pgpass file.
can anyone please figure out what is going wrong.
Thanks in Advance
Ashish...
| From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
|---|---|
| To: | Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: pgpass.conf |
| Date: | 2007-07-10 10:21:19 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
On 10/07/2007 08:47, Ashish Karalkar wrote:
> Still the batch asks for the password.!!!
> I am just not getting why its not reading password from pgpass file.
Probably a silly question, but if you're using the createdb utility in
the batch file, have you inadvertently included the -W option? - this
forces a password prompt.
Ray.
---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------
| From: | "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com> |
|---|---|
| To: | <rod(at)iol(dot)ie> |
| Cc: | <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: pgpass.conf |
| Date: | 2007-07-10 10:28:24 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
----- Original Message -----
From: "Raymond O'Donnell" <rod(at)iol(dot)ie>
To: "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, July 10, 2007 3:51 PM
Subject: Re: [GENERAL] pgpass.conf
> On 10/07/2007 08:47, Ashish Karalkar wrote:
>
>> Still the batch asks for the password.!!!
>> I am just not getting why its not reading password from pgpass file.
>
> Probably a silly question, but if you're using the createdb utility in the
> batch file, have you inadvertently included the -W option? - this forces a
> password prompt.
>
> Ray.
>
>
> ---------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod(at)iol(dot)ie
> ---------------------------------------------------------------
Thanks Ray for your replay,
No I haven't included -W option.
I have set this succesfully on redhat linux but iam messed up in Windows XP
prof.
Is there any other thing to do?
Thanks in advance
Ashish...
| From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
|---|---|
| To: | Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: pgpass.conf |
| Date: | 2007-07-10 10:40:18 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
On 10/07/2007 11:28, Ashish Karalkar wrote:
> I have set this succesfully on redhat linux but iam messed up in Windows
> XP prof.
>
> Is there any other thing to do?
I'm not a guru, but maybe it's a permissions problem on the pgpass file?
Ray.
---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------
| From: | Dave Page <dpage(at)postgresql(dot)org> |
|---|---|
| To: | Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: pgpass.conf |
| Date: | 2007-07-10 10:55:44 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
Ashish Karalkar wrote:
> Hello All,
>
> I am trying tu run a script to create database from a batch programme
> and dont want to supply password everytime.
> So i tried to setup pgpass.conf file.
> File is kept in user profile/application data
> i.e
> C:\Documents and Settings\postgres\Application Data\postgresql\pgpass.conf
>
> file contains:
>
> localhost:5432 :*:postgres:mypass
> localhost:5432:qsweb:qsweb:mypass1
>
> Still the batch asks for the password.!!!
> I am just not getting why its not reading password from pgpass file.
>
> can anyone please figure out what is going wrong.
Under what user account is the batch file being run? The pgpass.conf
file needs to be under *that* user account, which is not necessarily the
one that the postgresql server runs under.
Regards, Dave
| From: | "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com> |
|---|---|
| To: | "Dave Page" <dpage(at)postgresql(dot)org>, <rod(at)iol(dot)ie> |
| Cc: | <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: pgpass.conf |
| Date: | 2007-07-10 11:04:56 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
----- Original Message -----
From: "Dave Page" <dpage(at)postgresql(dot)org>
To: "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, July 10, 2007 4:25 PM
Subject: Re: [GENERAL] pgpass.conf
> Ashish Karalkar wrote:
>> Hello All,
>>
>> I am trying tu run a script to create database from a batch programme
>> and dont want to supply password everytime.
>> So i tried to setup pgpass.conf file.
>> File is kept in user profile/application data
>> i.e
>> C:\Documents and Settings\postgres\Application
>> Data\postgresql\pgpass.conf
>>
>> file contains:
>>
>> localhost:5432 :*:postgres:mypass
>> localhost:5432:qsweb:qsweb:mypass1
>>
>> Still the batch asks for the password.!!!
>> I am just not getting why its not reading password from pgpass file.
>>
>> can anyone please figure out what is going wrong.
>
> Under what user account is the batch file being run? The pgpass.conf
> file needs to be under *that* user account, which is not necessarily the
> one that the postgresql server runs under.
>
> Regards, Dave
The batch file is run under postgres user, also owner of the pgpass.conf
file is postgres.
As far as my knowledge the permission checking is not done on windows
anyways the owner is same so i dont think there is any problem of permission
from pg documents:
"The permissions on .pgpass must disallow any access to world or group;
achieve this by the command chmod 0600 ~/.pgpass. If the permissions are
less strict than this, the file will be ignored. (The file permissions are
not currently checked on Microsoft Windows, however.)"
| From: | Magnus Hagander <magnus(at)hagander(dot)net> |
|---|---|
| To: | Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com> |
| Cc: | Dave Page <dpage(at)postgresql(dot)org>, rod(at)iol(dot)ie, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: pgpass.conf |
| Date: | 2007-07-10 11:13:03 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
On Tue, Jul 10, 2007 at 04:34:56PM +0530, Ashish Karalkar wrote:
> >>Hello All,
> >>
> >>I am trying tu run a script to create database from a batch programme
> >>and dont want to supply password everytime.
> >>So i tried to setup pgpass.conf file.
> >>File is kept in user profile/application data
> >>i.e
> >>C:\Documents and Settings\postgres\Application
> >>Data\postgresql\pgpass.conf
> >>
> >>file contains:
> >>
> >>localhost:5432 :*:postgres:mypass
> >>localhost:5432:qsweb:qsweb:mypass1
> >>
> >>Still the batch asks for the password.!!!
> >> I am just not getting why its not reading password from pgpass file.
> >>
> >>can anyone please figure out what is going wrong.
> >
> >Under what user account is the batch file being run? The pgpass.conf
> >file needs to be under *that* user account, which is not necessarily the
> >one that the postgresql server runs under.
> >
> >Regards, Dave
>
> The batch file is run under postgres user, also owner of the pgpass.conf
> file is postgres.
> As far as my knowledge the permission checking is not done on windows
> anyways the owner is same so i dont think there is any problem of permission
>
> from pg documents:
> "The permissions on .pgpass must disallow any access to world or group;
> achieve this by the command chmod 0600 ~/.pgpass. If the permissions are
> less strict than this, the file will be ignored. (The file permissions are
> not currently checked on Microsoft Windows, however.)"
That part is correct. But it's of course necessary that the user can *read*
the file, in order to get it's contents. But there is no check if others
can (on Windows).
So just to be sure of that, I suggest you try logging in as the user in
question and making sure you can read the file from that account.
//Magnus
| From: | Dave Page <dpage(at)postgresql(dot)org> |
|---|---|
| To: | Ashish Karalkar <ashish(dot)karalkar(at)info-spectrum(dot)com> |
| Cc: | rod(at)iol(dot)ie, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: pgpass.conf |
| Date: | 2007-07-10 11:19:44 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
Ashish Karalkar wrote:
> The batch file is run under postgres user, also owner of the pgpass.conf
> file is postgres.
> As far as my knowledge the permission checking is not done on windows
> anyways the owner is same so i dont think there is any problem of
> permission
>
OK - have you tried 127.0.0.1 instead of localhost in the pgpass file?
> "The permissions on .pgpass must disallow any access to world or group;
> achieve this by the command chmod 0600 ~/.pgpass. If the permissions are
> less strict than this, the file will be ignored. (The file permissions
> are not currently checked on Microsoft Windows, however.)"
>
That's referring to the checks we do on *nix to ensure the file is
secure enough, rather than whether or not the client program can read it
which is what Rod was suggesting I think. The Windows ACL model is
sufficiently more complex that doing that check is far harder than it is
on *nix, and the Application Data directory should be secure anyway
(unless you're using FAT32, but then there's no helping you anyway :-) ).
Regards, Dave
| From: | "Zlatko Matic" <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> |
|---|---|
| To: | <pgsql-general(at)postgresql(dot)org> |
| Subject: | free scheduled import utility |
| Date: | 2007-07-10 12:32:58 |
| Message-ID: | 00aa01c7c2ee$7565cf80$45ac0fd4@zlatkovyfkpgz6 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
Hello.
Is there any free program/utility for batch imports from .csv files, that
can be easily scheduled for daily inserts of data to PostgreSQL tables?
Regards,
Zlatko
| From: | Reid Thompson <Reid(dot)Thompson(at)ateb(dot)com> |
|---|---|
| To: | Zlatko Matic <zlatko(dot)matic1(at)sb(dot)t-com(dot)hr> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: free scheduled import utility |
| Date: | 2007-07-10 12:38:28 |
| Message-ID: | 1184071108.4045.0.camel@jhereg |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
On Tue, 2007-07-10 at 14:32 +0200, Zlatko Matic wrote:
> Hello.
> Is there any free program/utility for batch imports from .csv files, that
> can be easily scheduled for daily inserts of data to PostgreSQL tables?
> Regards,
>
> Zlatko
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
cron, psql and http://www.postgresql.org/docs/8.2/static/sql-copy.html
| From: | Dimitri Fontaine <dfontaine(at)hi-media(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: free scheduled import utility |
| Date: | 2007-07-10 12:43:08 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
Le mardi 10 juillet 2007, Zlatko Matic a écrit :
> Is there any free program/utility for batch imports from .csv files, that
> can be easily scheduled for daily inserts of data to PostgreSQL tables?
COPY itself would do the job, but you can also use pgloader:
http://pgfoundry.org/projects/pgloader
It has many options, and is able to load data in the presence of errors,
logging them (both error.log and reject.log).
Hope this helps, regard,
--
dim
| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: free scheduled import utility |
| Date: | 2007-07-10 12:48:52 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
am Tue, dem 10.07.2007, um 14:32:58 +0200 mailte Zlatko Matic folgendes:
> Hello.
> Is there any free program/utility for batch imports from .csv files, that
> can be easily scheduled for daily inserts of data to PostgreSQL tables?
> Regards,
You can use the scheduler from your OS. For Unix-like systems is this
the CRON, with windows i'm not familiar.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
| From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
|---|---|
| To: | Pgadmin-Support <pgadmin-support(at)postgresql(dot)org> |
| Subject: | Re: [GENERAL] pgpass.conf |
| Date: | 2007-07-10 15:17:51 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
On 10/07/2007 12:19, Dave Page wrote:
> secure enough, rather than whether or not the client program can read it
> which is what Rod was suggesting I think. The Windows ACL model is
*ahem* Ray, not Rod. :-) (a common error, due to my email address)
Yes, that's what I meant.
Ray.
---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod(at)iol(dot)ie
---------------------------------------------------------------
| From: | Dave Page <dpage(at)postgresql(dot)org> |
|---|---|
| To: | rod(at)iol(dot)ie |
| Cc: | Pgadmin-Support <pgadmin-support(at)postgresql(dot)org> |
| Subject: | Re: [GENERAL] pgpass.conf |
| Date: | 2007-07-11 08:19:49 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgadmin-support pgsql-general |
Raymond O'Donnell wrote:
> On 10/07/2007 12:19, Dave Page wrote:
>
>> secure enough, rather than whether or not the client program can read it
>> which is what Rod was suggesting I think. The Windows ACL model is
>
> *ahem* Ray, not Rod. :-) (a common error, due to my email address)
>
> Yes, that's what I meant.
Sorry Ray - in my defence I'm still a little tired from travelling. I
normally get it right after all!
Regards, Dave