From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: md.c should not call files "relations" |
Date: | 2009-08-05 05:44:07 |
Message-ID: | 4A791C27.4070404@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> There's an interesting thread over here
> http://archives.postgresql.org/pgsql-sql/2009-08/msg00013.php
> in which someone mistook a filesystem-level permissions problem
> for a database permissions problem. It wasn't exactly his fault,
> I think, since the message he was presented with was
>
> ERROR: could not create relation "test": Permission denied
>
> which is not all that obviously different from what you would
> get for a SQL-permissions violation.
>
> I am thinking that this message would be more correct and less
> confusing if it looked something like
>
> ERROR: could not create file "12345/67890": Permission denied
>
> ie, when reflecting an OS-level error we should call a file a file and
> provide its filesystem name, not the name of the table that we were
> hoping to map to it. This would be more likely to lead the user's
> mind in the right direction, and he'd need the filesystem pathname
> for any detailed investigation anyway.
We already print the file name, not table name - since version 8.0. The
OP that saw the message was on 7.4.
I agree we should call file a file.
> This would have the further advantage that we could make all the
> errors in md.c consistent --- some of them provide filesystem names
> rather than table names because that's all they have available.
>
> Lastly, I'm wondering why someone seems to have removed the double
> quotes around the filesystem name in some of these messages.
> Surely that's not per style guide.
When I replaced %u/%u/%u with %s containing the relpath() of the file,
it didn't occur to add quotes. Agreed, they should be quoted.
Want me to change those or are you on it already?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-08-05 06:10:09 | Re: md.c should not call files "relations" |
Previous Message | Pavel Stehule | 2009-08-05 05:13:55 | Re: Patch for 8.5, transformationHook |