Thread: Re: creating a database
On Sunday, February 2, 2025, PG Doc comments form <noreply@postgresql.org> wrote:
I guess this is on the server side, in a Linux shell or similar?
I think this should be clarified in the text.
We haven’t even mentioned psql yet, aside from the conventions page where we cover $ means a shell prompt.
And what also could be clarified: can a database only be created on the
server side?
Or is there also a client (SQL) command to create a new database on the
server?
The description of createdb explains it is a wrapper for the “create database” sql command.
If I am to add anything it would probably be on the “architecture fundamentals” page. The points brought up are not specific to createdb and probably should be explained up-front as to the fact we have wrapped a number of SQL utility commands for the DBA as executable programs.
David J.
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Sunday, February 2, 2025, PG Doc comments form <noreply@postgresql.org> > wrote: >> And what also could be clarified: can a database only be created on the >> server side? >> Or is there also a client (SQL) command to create a new database on the >> server? > The description of createdb explains it is a wrapper for the “create > database” sql command. Yeah. What this page is really meant to do is help you get past typical problems in accessing an installation you've just set up. We mustn't load it down with answers to every question a novice could have, especially not questions that are answered on adjacent or linked pages. If we were to extend it at all, I'd think about expanding its charter to include "help you get past typical problems in accessing an installation on another machine". This'd involve mentioning the -h and -p switches, probably. But I'm not sure if that would be a net benefit or just confuse some users more than it helps others. Another thought is that the first para on the next page, which mentions alternatives such as pgAdmin, maybe should be moved here with some suitable alterations (or added to the end of Architectural Fundamentals, perhaps). Both of these pages are oriented towards "access Postgres from a terminal command line", which I concede is probably a minority thing anymore. regards, tom lane