A pg_hba.conf file is set up as follows. local all all md5 host all all 127.0.0.1/32 md5
host all all 172.16.1.0/24 md5
When user foo connects to database bar from host IP address 172.16.1.2, I would like password verification to not be performed.
Select one appropriate line for the new pg_hba.conf file.
A. Add "host foo bar 172.16.1.2/32 trust" to the first row.Select two correct statements that describe what occurs on the client side when the following command is executed.
pg_ctl -m smart stop
A. Clients will not be able to make new 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 db1SQL statements were executed in the following order: CREATE TABLE fmaster (id INTEGER PRIMARY KEY, name TEXT);
CREATE TABLE ftrans
(id INTEGER REFERENCES fmaster (id), stat INTEGER, date DATE); INSERT INTO fmaster VALUES (1, 'itemA');
INSERT INTO ftrans VALUES (1, 1, CURRENT_DATE);
Select the two SQL statements that will generate an error when executed next.
A. DROP TABLE ftrans;A table is defined as follows: CREATE TABLE t (id INT, val TEXT); Select two correct statements from below about the function "get_head" defined below.
CREATE FUNCTION get_head(BOOLEAN)
RETURNS TEXT LANGUAGE sql CALLED ON NULL INPUT
AS 'SELECT val FROM t WHERE $1 OR id > 0 ORDER BY id LIMIT 1;';
A. This function is defined using PL/pgSQL.Select two correct statements about the command shown below. Note: $ is the command prompt. $ pg_ctl reload
A. The command forces the content of pg_hba.conf to be re-read into PostgreSQL server process.Given the following two table definitions, select one SQL statement which will cause an error.
CREATE TABLE sample1 (id INTEGER, data TEXT);
CREATE TABLE sample2 (id INTEGER);
A. SELECT id AS data, data FROM sample1;The table "foo" is defined as follows:
CREATE TABLE foo (bar TEXT);
Next, four SQL statements were executed in the following order.
INSERT INTO foo VALUES ('bar'); -------- (1)
ALTER TABLE foo ADD COLUMN c1 TEXT; ---- (2)
ALTER TABLE foo ADD UNIQUE (c1); ------- (3)
ALTER TABLE foo DROP COLUMN bar; ------- (4)
Select the correct statement from those below.
A. An error occurs when executing the (1) SQL statement.I want to restore data from a text format backup file foo.dump. Select an appropriate command.
A. pg_dump -R foo < foo.dumpThe tables "t1" and "t2" are defined below. Tables "t1" and "t2" have columns "id" that are of INTEGER type, and columns "name" that are of TEXT type. t1 t2 The following SQL command was executed. Select the number of rows in the result. SELECT
*
FROM t1 RIGHT OUTER JOIN t2 ON t1.id = t2.id;
A. 2 rowsNowadays, 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.