Re: Editing config files which are not in database directory - Mailing list pgadmin-support

From Andrus
Subject Re: Editing config files which are not in database directory
Date
Msg-id 36381D7F48E5424680E8CD5E2C96AB62@andrusnotebook
Whole thread Raw
In response to Re: Editing config files which are not in database directory  (Dave Page <dpage@pgadmin.org>)
List 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. 



pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: Editing config files which are not in database directory
Next
From: mad rug
Date:
Subject: Re: Viewing TEXT objects