Re: Editing config files which are not in database directory

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Dave Page" <dpage(at)pgadmin(dot)org>
Cc: <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Editing config files which are not in database directory
Date: 2009-10-01 10:06:07
Message-ID: 36381D7F48E5424680E8CD5E2C96AB62@andrusnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

> pgAdmin doesn't know what it's opening until it looks at it - and as a
one-line config file with a single include directive or comment is
technically valid, and we intentionally don't hard-code the allowable
directives into pgAdmin (consider user defined GUCs for add-on
modules), it's not completely straightforward to work out if a file is
what you would call valid or not.

Server returns error for file operation.
pgAdmin must know that if file open or seek command returns error, file
cannot be opened and should not open editing window.
Currently it opens editing window.
No additional hard coding is required.

> It's not that simple because the system needs to be configured before
the server is brought up, and the config file needs to be readable by
the postmaster before it gets anywhere close to being able to access
the database.

data storage format should remain same, plain text files.

> Also not that simple. This has been discussed at length in
pgsql-hackers. How do you deal with comments in the config file? What
about overriding config directives?

This is implemented in pgAdmin: it allows to edit files with comments in
separate lines.
So this code can be copied from pgAdmin.

sadly, order, where (search) and grouping is not available in pgadmin
editor.

> What about situations where the
distribution breaks the config into multiple files to avoid
complications with upgrades?

In every line there can be reference to source file.
Lines with write access can written back to config files.

Andrus.

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message mad rug 2009-10-01 12:24:46 Re: Viewing TEXT objects
Previous Message Dave Page 2009-10-01 09:16:04 Re: Editing config files which are not in database directory