Let’s see how to change a user’s password or your own password in PostgreSQL. We’ll also discuss how to avoid sending the password in clear over a network.
PostgreSQL allows to create, read and write tables without columns. Let’s see how to work with them, and whether they can have practical uses.
Let’s see how to check what a user can do with a certain PostgreSQL table, or which users have a certain permission on a table.
In PostgreSQL, string comparisons are case-sensitive by default. Making them case-insensitive requires the ILIKE operator and may require an additional index for performance reasons.
Sometimes we want to find all events that happened in a given year. For example, a count of the sales that happened in the year 2000. It’s frequent to run a correct query that turns out to be slow. Let’s see how to do it properly.
PostgreSQL manual says that it is not possible to delete an element from an
ENUM type, nor change their order. However, there is a way to do it in a single transaction.
Sometimes a text column should not contain free texts, but only values from a predefined list. PostgreSQL allows to achieve this by creating an enumeration – or an
ENUM type. This allows validation on input, and makes the values more efficient.
Why and how to write comments on database, tables, and other objects on most DBMSs. How to read comments.
How to select rows where a text column starts by, ends by, or contains a string. Including slightly less trivial cases.
How to get the length of the longest text in a column. Including Db2 specific syntax.