Select the most appropriate statement about the initdb command.
A. It can not be executed by an OS administrator-level user (root user).
B. It can only be executed by the user who installed PostgreSQL.
C. Unless the environment variable PGDATA is set, it can not be executed.
D. When "auto" is designated as the value for the environment variable PGDATA, a directory is automatically set up.
E. The directory designated by the environment variable PGDATA must exist.
Select the most suitable statement about the creation of a new database.
A. Only a PostgreSQL superuser is authorized to create a new database.
B. The target directory is specified by the environment variable PGDATA or the -D parameter when creating a database.
C. Only one database can be used at the same time even if two or more databases are created.
D. Only the OS superuser (root) can create databases.
E. You can set the character encoding when creating a new database.
What does the following command do? Choose two incorrect statements from the selection below.
Note: $ is the command prompt.
$ pg_restore -U postgres -d database1 database1.dump
A. This command restores the database database1 from the file database1.dump.
B. This command connects to a database as the user 'postgres'.
C. This command can not be executed unless the postmaster is running.
D. This command can not restore large objects.
E. This command must be executed under the condition where the database database1 does not exist.
Select one incorrect statement about the command shown below. Note: $ is the command prompt. $ dropuser -U admin foo
A. If there is a database owned by foo, an error will occur.
B. If admin is not the owner of foo, an error will occur.
C. If admin doesn't have the superuser privilege, an error will occur.
D. The user admin is removing the user foo.
E. The same process can be performed using the SQL command "DROP USER".
Select an appropriate command to check the PostgreSQL version in psql.
A. \server_version
B. SELECT version;
C. SELECT version();
D. SHOW version;
E. SHOW server;
I would like to check the privileges on the "items" table in psql. Select the most appropriate command.
A. \a items
B. \d items
C. \t items
D. \p items
E. \z items
Which psql command do you need to execute to display the list of tables in the currently connected database?
A. SELECT * FROM pg_table_list;
B. SHOW tables;
C. \dT
D. \dt "database_name"
E. \dt
The following table called 'company' is defined as follows:
id | name
----+-----------------1 | Pgsql,inc.
2 | Postgres Co.,Ltd
3 | SQL Company.
Select the most appropriate psql command for generating a text file company.txt on the client side with the
following content:
1,"Pgsql,inc."
2,"Postgres Co.,Ltd"
3,SQL Company.
A. \copy company TO 'company.txt' WITH ','
B. \copy company TO 'company.txt' WITH DELIMITER AS ','
C. \copy company TO 'company.txt' DELIMITER ','
D. \copy company TO "company.txt"
E. \copy company TO company.txt CSV
Select the most suitable statement regarding PostgreSQL's pg_hba.conf configuration file.
A. You can use any number of authentication types on a single line.
B. You cannot set different authentications per user.
C. You can set different authentications per table.
D. The authentication settings in the file are evaluated from the top line to the bottom line.
E. krb5 authentication can only be used for local connections.
I would like to restore the database cluster from the "db1.dump" backup file. Select the correct command from below. (Note: "postgres" is the superuser)
A. pg_restore -U postgres -f db1.dump db1
B. pg_dump --restore db1 < db1.dump
C. pg_dump -U postgres --restore db1 < db1.dump
D. psql -U postgres -f db1.dump db1
E. pg_resetxlog -U postgres db1 < db1.dump
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only PostgreSQL-CE exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your PGCES-02 exam preparations and PostgreSQL-CE certification application, do not hesitate to visit our Vcedump.com to find your solutions here.