Re: Anyone care about type "filename" ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Anyone care about type "filename" ?
Date: 2000-08-01 21:23:53
Message-ID: 28204.965165033@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The Hermit Hacker <scrappy(at)hub(dot)org> writes:
> okay, reword ... what would have been the difference between that and
> char(256)? :) I'm just curious as to whether it had any checks that would
> have validated it as being a filename or something like that, that's all

Actually, the input converter did have some code to expand "~username"
paths. But putting that in the input converter was broken by design;
you don't want the home directory expanded in a path when it's stored
into the database, you want to expand it when the path is used (what
if the user's home dir has moved since you made the DB entry?)

It might be worth pulling that code out of the CVS attic and inventing
a text-to-text "expand_pathname()" function that expands ~username and
perhaps also $ENVIRONMENTVAR in text strings interpreted as pathnames.
But I doubt that having a separate type for filenames is useful.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Sears 2000-08-01 22:26:36 Re: random() function produces wrong range
Previous Message Dave Smith 2000-08-01 20:40:33 Re: [HACKERS] Re: random() function produces wrong range