Skip site navigation (1) Skip section navigation (2)

Re: psql \i handling ~ in specified file name

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, <zirmen(at)shaw(dot)ca>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: psql \i handling ~ in specified file name
Date: 2003-12-21 15:07:39
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE2A699C@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-patches
>Zach Irmen said:
>> "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>>> What happens if getenv("HOME") returns NULL?
>>
>> Yeah, the strdup fails. I'll take it out to fix that.
>>
>>> You also need to think about Windows
>>
>> Can I just ifndef WIN32 and not think about it? I'm not sure how that
>> would work either.
>>
>
>If we are going to have a Windows port I don't think we should 
>treat it as
>a poor cousin.
>
>This information is easily discoverable on MSDN in 5 minutes. 
>The answer
>is that you need to call NetUserGetInfo at level 11 to get a 
>user's home
>directory. See
>http://msdn.microsoft.com/library/en-us/dnucmg/html/ucmgch09.asp and
>http://msdn.microsoft.com/library/en-us/netmgmt/netmgmt/netuser
getinfo.asp

> (Thinks: using this requires linking with NetAPI32.dll - is that a
legal
> or practical problem for us?)

This is already done by libpq if compiled on Win32. Which means also
psql.exe is linked against it on Win32. (see win32.mak in
interfaces/libpq).

So it shuoldn't be a problem, I think.


//Magnus

pgsql-patches by date

Next:From: Andrew DunstanDate: 2003-12-21 15:22:23
Subject: Re: psql \i handling ~ in specified file name
Previous:From: Christopher Kings-LynneDate: 2003-12-21 09:48:48
Subject: Re: [GENERAL] Temporary tables and miscellaneous schemas

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group