Loading, please wait...

PostgreSQL MCQ Quiz (Multiple Choice Questions And Answers)

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

21. To copy a database from server1 to server2, you might use which of the following:

  • pg_mv -h server1 database | pgsql -h server2 database
  • pg_dump -h server1 database > pgsql -h server2 database
  • pg_copy -h server1 database | psql -h server2 database
  • pg_dump -h server1 database | psql -h server2 database

22. Fill the blank space:

The __________ database model has the advantage of being able to quickly discover all of the records of one type that are related to a specific record of another type by following the pointers from the starting record.
  • relational
  • network
  • hierarchical
  • structured

23. Which statement is not true about a PostgreSQL domain?

  • A domain is created by ‘CREATE DOMAIN’.
  • A domain can be used as a column type when defining a table.
  • Domain is a namespace existing between databases and objects such as tables.
  • When defining a domain, you can add a default value and constraints to the original data.

24. To restore a PostgreSQL backup created with pg_dump, the following may be used:

  • $ psql -F database_dump.psql database_name
  • $ psql -R database_dump.psql database_name
  • $ psql -f database_dump.psql database_name
  • $ psql -r database_dump.psql database_name

25. Which statement is true about PostgreSQL data types?

  • A large object data type can be used to store data of unlimited size.
  • Only the INTEGER type can be declared as an array.
  • n’in CHARACTER(n) represents the number of bytes.
  • There is a non-standard PostgreSQL data type, called Geometric data type, which handles 2-dimensional data.