It is known that one can copy an init.sql file to be executed on the creation of the container with a docker command similar to this one: COPY init.sql /docker-entrypoint-initdb.d/
Let's consider that one uses a very simple create table postgresql statement:
CREATE TABLE films (
code char(5) CONSTRAINT firstkey PRIMARY KEY,
title varchar(40) NOT NULL,
did integer NOT NULL,
date_prod date,
kind varchar(10),
len interval hour to minute
);
The question is where (in which database) is this table created?
But more importantly is how to set the current working database to specify exactly on which database we are working with??
Not only for this statement but also for all subsequent ones, and they are many!