Re: Win32 sysconfig -> pg_service.conf

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Win32 sysconfig -> pg_service.conf
Date: 2006-04-21 23:30:10
Message-ID: 200604212330.k3LNUAf00981@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan wrote:
>
>
> David Fetter wrote:
>
> >>>doesn't report anything by way of --sysconfdir, which in turn means
> >>>that people have to do some fragile hackery in order even to see a
> >>>pg_service.conf file. Can we put such a configuration directive
> >>>into the binary builds? Is this known to work?
> >>>
> >>>
> >>In any case, the default is $prefix/etc which is probably not what
> >>you want anyway - why not set the PGSYSCONFDIR environment variable
> >>to point to where you put the service file?
> >>
> >>
> >
> >Let's turn that question around. Why *shouldn't* there be a default
> >built in? "No default" seems like a pretty poor fall-through.
> >
> >
> >
> >
>
> On further investigation, this appears to be an artifact of the
> directory not existing, causing GetShortPathName to return an empty
> string, as noted in this comment:
>
> * This can fail in 2 ways - if the path doesn't exist, or short names are
> * disabled. In the first case, don't return any path.
>
> I think maybe we need a pg_config switch to allow us to fall back to
> GetFullPathName, which does not fail if the target doesn't exist. After
> all, it's cold comfort that libpq probably does the right thing if we
> don't have any reasonable way of finding out what that is.
>
> In the case of Windows binary packages, the place that actually works is
> apparently $bindir/../etc
>
> thoughts?

In looking at cleanup_path(), why don't we just return the original
string if GetShortPathName() doesn't return anything?

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-04-21 23:53:43 Re: proposal - plpgsql: execute using into
Previous Message Gevik Babakhani 2006-04-21 23:14:32 Re: TODO item question [pg_hba.conf]

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-04-21 23:33:22 Re: restore to defaults values when commenting of variables
Previous Message Bruce Momjian 2006-04-21 23:11:42 Re: patch to have configure check if CC is intel C compiler