Show encoding in initdb messages

Started by Christopher Kings-Lynneover 22 years ago4 messagespatches
Jump to latest
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

Does this:

The files belonging to this database system will be owned by user "chriskl".
This user must also own the server process.

The database cluster will be initialized with locale C.

The database cluster will be initialized with default encoding UNICODE.

creating directory /home/chriskl/local/data ... ok
creating directory /home/chriskl/local/data/global ... ok
....

This should save a lot of support requests, hopefully.

Chris

Attachments:

initdb.txt.gzapplication/x-gzip; name=initdb.txt.gzDownload
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: Show encoding in initdb messages

Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

The database cluster will be initialized with locale C.
The database cluster will be initialized with default encoding UNICODE.

This should save a lot of support requests, hopefully.

I kinda doubt it will save any :-(. In what situation would this not
merely be echoing back what the guy had just specifically typed on the
command line?

If we knew how to detect that the encoding doesn't work with the
selected locale value, then we could get somewhere ...

regards, tom lane

#3Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Tom Lane (#2)
Re: Show encoding in initdb messages

This should save a lot of support requests, hopefully.

I kinda doubt it will save any :-(. In what situation would this not
merely be echoing back what the guy had just specifically typed on the
command line?

When no -E argument is supplied at all, or when they type ISO-8859-1
instead of LATIN1.

The reason it will help with support is because newbies will go
"SQL_ASCII! I don't want ascii!". Then they will kill initdb, check the
man page and then re-run it with a real encoding.

Seriously NO new postgres user checks the initdb man page before running
is the first time. I know this from the irc channel...

Either way, I see no reason _not_ to just do it...

Chris

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#3)
Re: Show encoding in initdb messages

Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

This should save a lot of support requests, hopefully.

I kinda doubt it will save any :-(. In what situation would this not
merely be echoing back what the guy had just specifically typed on the
command line?

When no -E argument is supplied at all, or when they type ISO-8859-1
instead of LATIN1.

When no -E is supplied, we always default to SQL_ASCII; there's no
possibility of adopting a value from the environment. The reason that
the locale printout exists is that the command line doesn't completely
specify what locale will be used. That reason doesn't apply to encoding.

The reason it will help with support is because newbies will go
"SQL_ASCII! I don't want ascii!".

No they won't. They will likely not even notice this message in the sea
of other messages they've never seen before; and even if they do notice
it, they will certainly not realize that they don't want it. If the
message were to *say* "this is probably a bad choice because it's
incompatible with your locale selection", then it might possibly have
the effect you're hoping for, but I don't see how we can find that out.

Either way, I see no reason _not_ to just do it...

We could make initdb print out every other setting it has too, but that
would not improve its user interface. Adding messages that don't carry
useful content just debases the importance of each one.

regards, tom lane