Verify your knowledge
- On PostgreSQL 15 and PostgreSQL, is it possible to make DDL as a normal user?
No it’s not possible. See the PostgreSQL and the public schema section for more details.
- What is the
psql
command to list all the databases with their sizes?postgres=# \l+
See the Confirming the database size section for more details.
- If the table is defined as the following:
create table mytable (id integer,city_name varchar(60));
The question is, does the following query show all records for which the
city_name
field isnull
?select * from mytable where city_name = '';
No it doesn’t. The correct query is:
select * from mytable where city_name is null;
See the NULL values section for more details.
- Can we create a new database, taking an existing one as a starting point?
Yes, we can. We can use the
TEMPLATE
option...