PostgreSQL Commands Flashcards

Learn brief description of the SQL commands supported by PostgreSQL. Source: PostgreSQL documentation.

1
Q

BEGIN

[ WORK | TRANSACTION ]

A

Starts a transaction block. Different meaning in embedded SQL. Use START TRANSACTION instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

ABORT

[ WORK | TRANSACTION ]

A

Aborts the current transaction; historical, use ROLLBACK instead

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

START TRANSACTION

A

Starts a transaction block.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ROLLBACK

[ WORK | TRANSACTION ]

A

Aborts the current transaction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SET TRANSACTION

A

Set the characteristics of the current transaction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

COMMIT

[ WORK | TRANSACTION ]

A

Commits the current transaction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

END

[ WORK | TRANSACTION ]

A

Commits the current transaction. PostgreSQL extension. Use COMMIT instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

REINDEX

A

Rebuild indexes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

VACUUM

A

Garbage-collect and optionally analyze a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

ANALYZE

A

Collect statistics about a database table for use by the query planner.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SHOW [ALL | name]

A

Show the value of a run-time parameter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SET [ SESSION | LOCAL ]

A

Change a run-time parameter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

RESET

A

Restore the value of a run-time parameter to the default value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

SELECT

A

Retrieve rows from a table or view.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

FROM Clause

A

The FROM clause specifies one or more source tables for the SELECT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly