Re: How to run a script with Query Tool?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Richard Bernstein <richb201(at)gmail(dot)com>
Cc: "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: How to run a script with Query Tool?
Date: 2020-06-19 16:09:32
Message-ID: CAKFQuwa8nEGfhyPwktFHYE4OFE7ffGFD_EQEMZGwk+4=2pWf2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Friday, June 19, 2020, Richard Bernstein <richb201(at)gmail(dot)com> wrote:

> I have a script that I need to run. The SQL script first creates a
> database called sampledb.
> CREATE DATABASE `sampledb`
> I read in the docs that to start the Query Tool I need to pick Query Tool
> from the Tools menu. But the Query Tool is greyed out unless I have already
> chosen a database. I am concerned about running the script (which creates a
> database) since I am already in a database. Seems illogical. Can someone
> confirm that I can run my script in any of the existing databases with
> causing a major issue for myself?
>

You should also consult the official PostgreSQL documentation, not just the
documentation for your client program.

https://www.postgresql.org/docs/12/manage-ag-createdb.html

David J.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2020-06-19 16:09:49 Re: How to run a script with Query Tool?
Previous Message Richard Bernstein 2020-06-19 16:00:17 How to run a script with Query Tool?