Units in postgresql.conf -- How to report?

Started by Peter Eisentrautover 19 years ago5 messages
#1Peter Eisentraut
peter_e@gmx.net

So assuming we allowed units in postgresql.conf, how would you report
them with SHOW?

1. The way they were set (hard)

2. Without units (not user-friendly)

3. Always in base units (seconds or bytes)

4. The largest unit that gives an integer

(4) seems the most reasonable to me in terms of interface and
implementation.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#2David Fetter
david@fetter.org
In reply to: Peter Eisentraut (#1)
Re: Units in postgresql.conf -- How to report?

On Mon, Jul 24, 2006 at 11:13:53PM +0200, Peter Eisentraut wrote:

So assuming we allowed units in postgresql.conf, how would you report
them with SHOW?

1. The way they were set (hard)

2. Without units (not user-friendly)

3. Always in base units (seconds or bytes)

4. The largest unit that gives an integer

(4) seems the most reasonable to me in terms of interface and
implementation.

I'm for (4), as it's also what people are used to from things like
GNU's -h option.

Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778 AIM: dfetter666
Skype: davidfetter

Remember to vote!

#3Albe Laurenz
all@adv.magwien.gv.at
In reply to: David Fetter (#2)
Re: Units in postgresql.conf -- How to report?

Peter Eisentraut wrote:

So assuming we allowed units in postgresql.conf, how would you report
them with SHOW?

1. The way they were set (hard)

2. Without units (not user-friendly)

3. Always in base units (seconds or bytes)

4. The largest unit that gives an integer

(4) seems the most reasonable to me in terms of interface and
implementation.

4. would be the best option for human readers, but it would be a pain
for
a script that parses command output.

Maybe 3. would be a good compromise.

Yours,
Laurenz Albe

#4Jim C. Nasby
jnasby@pervasive.com
In reply to: Albe Laurenz (#3)
Re: Units in postgresql.conf -- How to report?

On Tue, Jul 25, 2006 at 08:48:34AM +0200, Albe Laurenz wrote:

Peter Eisentraut wrote:

So assuming we allowed units in postgresql.conf, how would you report
them with SHOW?

1. The way they were set (hard)

2. Without units (not user-friendly)

3. Always in base units (seconds or bytes)

4. The largest unit that gives an integer

(4) seems the most reasonable to me in terms of interface and
implementation.

5. Using whatever units were used in postgresql.conf

4. would be the best option for human readers, but it would be a pain
for
a script that parses command output.

For scripts I think the best bet would be to go with 3 on
current_setting().
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

#5Peter Eisentraut
peter_e@gmx.net
In reply to: Jim C. Nasby (#4)
Re: Units in postgresql.conf -- How to report?

Jim C. Nasby wrote:

On Tue, Jul 25, 2006 at 08:48:34AM +0200, Albe Laurenz wrote:

Peter Eisentraut wrote:

So assuming we allowed units in postgresql.conf, how would you
report them with SHOW?

1. The way they were set (hard)

2. Without units (not user-friendly)

3. Always in base units (seconds or bytes)

4. The largest unit that gives an integer

(4) seems the most reasonable to me in terms of interface and
implementation.

5. Using whatever units were used in postgresql.conf

That is (1).

--
Peter Eisentraut
http://developer.postgresql.org/~petere/