Обсуждение: How do i get the location or -D paramter to accept a windows path using cygwin postgresql
How do i get the location or -D paramter to accept a windows path using cygwin postgresql
От
"Chris Brown"
Дата:
Hi, I am trying to create a new database at the location E:\PGdbs on a system running cygwin postgresql. If I try to set this location using pgAdmin II it errors out complaining about the first character in the string. If I try to set this location using the -D paramater of create the following happens: ********************************************************************* C:\Program Files\PostgreSQL\7.3\bin>bash [/] $ initlocation e:\pgDBs The location will be initialized with username "adminchris". This user will own all the files and must also own the server process. Fixing permissions on pre-existing directory e:pgDBs Fixing permissions on pre-existing directory e:pgDBs/base initlocation is complete. [/] $ createdb -D 'e:\pgDbs' testdb ERROR: Postmaster environment variable 'e:pgDbs' not set createdb: database creation failed [/] $ initlocation e:/pgDBs The location will be initialized with username "adminchris". This user will own all the files and must also own the server process. Fixing permissions on pre-existing directory e:/pgDBs Fixing permissions on pre-existing directory e:/pgDBs/base initlocation is complete. [/] $ createdb -D 'e:/pgDbs' testdb ERROR: Relative paths are not allowed as database locations createdb: database creation failed [/] $ ************************************************************************ Is there a workaround of some kind? Thanks for any advice. Chris
Re: How do i get the location or -D paramter to accept a windows path using cygwin postgresql
От
s0lao@netscape.net (S. L.)
Дата:
Chris, [...] >I am trying to create a new database at the location E:\PGdbs on a >system running cygwin postgresql. [...] > >Is there a workaround of some kind? > [...] Yes, e.g. by replacing "E:\PGdbs" with `cygpath -u "E:\\PGdbs"` (note the double backslash) or with `cygpath -u E:/PGdbs`.In both cases the $() shell notation could be used instead of `` (`cygpath -u "E:\\PGdbs"` becomes $(cygpath -u"E:\\PGdbs") ). As a note, reading at least "Cygwin User's Guide" ( http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html ) could also helpmany users of cygwin enabled applications. SLao __________________________________________________________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397 Get AOL Instant Messenger 5.1 free of charge. Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promo=380455