Upwork Test Answers: Get all the correct answers of most recent and possible Upwork Tests A to Z (Updated on Jan, 2016)
Cover Letter Templates: These cover letter samples are not only for Upwork job, but also you will have some idea about your real life job
Freelance Profile Overviews: Different Profile samples and overviews of experts, advanced and intermediate level freelancers
For Newbie of Upwork: Upwork Help - How to apply for a job in Upwork with 10 most important articles about Upwork

A to Z View - All Upwork Test Answers

Upwork PostgreSQL RDBMS Test Answer

Are the contents of the pg_autovacuum system catalog saved when pg_dumpall is used to backup the database?
Answers: • No

On a UNIX system, what is the best way to prevent all non-local connections to the postmaster?
Answers: • None of the above

Can deferrable constraints be deferred by a trigger?
Answers: • Yes

After a PostgreSQL installation, how will you create the database cluster?
Answers: • With initd

How will you change the TCP port which PostgreSQL will listen to?
Answers: • By changing "port" in postgresql.conf

Which of the following queries will create a table with two fields, "id" and "name" with "id" as an auto incrementing primary key?
Answers: • create table foo (id serial primary key, name varchar(255));

How will you list the available functions from psql?
Answers: • \df

Consider the following query:

Create table foo (bar varchar);

What will be the size limit of the bar?
Answers: • No limit (It will be equivalent to the text)

What is the well known port number for the postgresql database service?
Answers: • 5432

What is true regarding file system backup?
Answers: • All of the above

Which one of the following text search functions does not exist?
Answers: • plainto_tsvecto

How do you alter a column to forbid null values?
Answers: • None of the above

What is the difference between to_tsvector() and ::tsvector ?
Answers: • to_tsvector () can be used in select statements, while ::tsvector cannot

What is the storage size of an integer on a 64bit system?
Answers: • 4bytes

While creating a trigger, the function it will call may be created after it and attached to it.
Answers: • True

Which function should be used to highlight the results?
Answers: • ts_highlight

Which PostgreSQL version added the enum datatype?
Answers: • 8.0

When using LIKE to compare strings, what is the wildcard operator (operator which matches zero or more characters)?
Answers: • *

For proper results, which of the following should contain a tsvector?
Answers: • Lexemes

What is the command used to import a backup made with pg_dumpall > file.dmp?
Answers: • psql -f file.dmp

Which of the following statements will produce an error?
Answers: • SELECT now()::int;

To backup a database, the postmaster daemon must be halted.
Answers: • True

The following statement will retrieve the second element of the array column products in table store_products.

SELECT products[1] FROM store_products;
Answers: • True

SELECT 'infinity'::timestamp;

Will this statement produce an error?
Answers: • No

What is the difference between tokens and lexemes?
Answers: • A lexeme is a string while a token is an intege

Which kind of index can be declared unique?
Answers: • Hash

SELECT rtrim('foobar', 'abr');

The result of this statement is foo.
Answers: • True


What output will this statement give?
Answers: • 6

An ISO-8601 time may be entered into a table using the numeric format 012411 instead of 01:24:11.
Answers: • True

While creating a table with a field of the serial type, a sequence will be created.
Answers: • True

How do you create a table with a field of the int array type?
Answers: • create table foo (bar integer[]);

What is the name of the special time input with value 00:00:00.00 UTC?
Answers: • None of the above

Consider the following empty table:

CREATE TABLE example (
    a integer,
    b integer,
    c integer,
    UNIQUE (a, c)

Which of the following inserts will cause an error?
Answers: • insert into example (a, b, c) values (1, 2, 3), (1, 4, 3);

Which of the following statements will create a table with a multidimensional array as second column?
Answers: • CREATE TABLE favorite_books (customer_id integer, themes_and_titles text[][]);

If max_connections is 10 and 10 connections are currently active, how can you be sure the superuser will be available to connect?
Answers: • Set superuser_reserved_connections in postgresql.conf

How will you rank text search results?
Answers: • With the ORDER BY operator

Which of the following statements will create a table special_products which is a child of the table store_products?
Answers: • CREATE TABLE special_products (quality int) INHERITS store_products;

Which of the following statements will create a table?
Answers: • SELECT * INTO products_backup FROM special_products;

Which of the following statements will retrieve the number of values stored in an array column?
Answers: • SELECT array_dims(products) FROM store_products;

Does PostgreSQL support SSL?
Answers: • Yes

What is the effect of turning fsync off in postgresql.conf?
Answers: • File synchronization will be deactivated

Given a table special_products that inherits from a table store_products, which of the following statements will modify store_products only without affecting its child table?
Answers: • UPDATE ONLY store_products SET name = 'Wine' WHERE id = 2;

What can be stored in a column of type decimal(4,3)?
Answers: • 4 numeric values with up to 3 digits to the right of the decimal point.

What is the ~ operator?
Answers: • POSIX regular expression match operator

What interfaces are available in the base distribution of PostgreSQL?
Answers: • C

What is the default ordering when ORDER BY is not specified?
Answers: • The ordering is unknown if not specified

A table can have only one primary key column.
Answers: • True

What command will correctly restore a backup made with the following command?
pg_dump -Fc dbname > filename
Answers: • psql -f filename dbname

How do you select a single random row from a table?
Answers: • SELECT * FROM tab ORDER BY random() LIMIT 1;

PostgreSQL triggers can be written in C directly.

Answers: • True

No comments:

Post a Comment