Select two suitable statements about sequences.
A. A sequence always returns a 4-byte INTEGER type value, so the maximum value is 2147483647.
B. A sequence is defined by 'CREATE SEQUENCE', and deleted by 'DROP SEQUENCE'.
C. Although the "nextval" function is called during a transaction, it will have no effect if that transaction is rolled back.
D. A sequence always generates 0 or consecutive positive numbers.
E. A sequence number can be set by calling the "setval" function.
The "sample" table consists of the following data: How many rows are returned by executing the following SQL statement?
SELECT DISTINCT ON (data) * FROM sample;
A. 2 rows
B. 3 rows
C. 4 rows
D. 5 rows
E. 6 rows
The "sample" table consists of the following data: How many rows are returned by executing the following SQL statement? SELECT * FROM sample WHERE v ~ 'ab';
A. 0 rows
B. 1 row
C. 2 rows
D. 3 rows
E. 4 rows
The "animal" table consists of the following data:Select the correct result returned by executing the following SQL statement: SELECT name FROM animal ORDER BY weight DESC LIMIT 2 OFFSET 1;
A. A syntax error will occur.
Select the most suitable statement about the PostgreSQL license from below.
A. PostgreSQL is distributed under the GPL license.
B. PostgreSQL is distributed under the PostgreSQL license.
C. PostgreSQL is distributed under the LGPL license.
D. PostgreSQL is distributed under the BSD license.
E. PostgreSQL is distributed under the X11(MIT) license.
Select two suitable statements about the BSD license from below.
A. If you make changes to the source code, feedback must be sent to the original developers.
B. It is used by open source software.
C. User registration is required.
D. It is defined by Free Software Foundation, Inc. (FSF).
E. Software under the BSD license can be incorporated with any programs provided that the copyright notice appears in all copies.
Select two incorrect statements about the Point-In-Time Recovery (PITR) from below.
A. This is a backup method integrating a physical backup and a transaction log (WAL).
B. It is necessary to stop the database server to perform a backup for the first time.
C. Updated data is continuously saved.
D. A restore can be performed to any arbitrary point in time since the starting point of PITR.
E. A backup can only be performed on a per-database basis.
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
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.
What does the following command do? Choose one incorrect statement from the selection below. $ pg_dumpall -U postgres > 20060601.bak
A. Backup all the databases in a database cluster.
B. Backup postgresql.conf along with databases.
C. Backup with plain-text format.
D. Backup user and group information along with databases.
E. You can access databases while the backup is in process.