In PostgreSQL, the DELETE CASCADE feature allows us to delete the records associated with some other tables (via foreign key constraints).
24x7x365 since 1997
Command Prompt, Inc., is the oldest Postgres Company in North America and one of the oldest Open Source firms still operating today. We serve our clients with best in class expertise and professionalism. You can read more about support and services here:
You have landed at the largest single source of Postgres education blogs in the world. At Command Prompt, we believe deeply that the education of the community is critical to the continued success of Postgres and related technologies. We hope you find content you are looking for and don't hesitate to Contact us today for all your Postgres and Open Source consulting and support needs.
In PostgreSQL, the DELETE CASCADE feature allows us to delete the records associated with some other tables (via foreign key constraints).
In Postgres, the EXTRACT(), DATE_TRUNC(), and DATE_PART() functions are used to extract the month from a date field and then use the GROUP BY clause to group the results by month.
In PostgreSQL, the DATE_PART() function, INTERVAL, and the minus “-” operator is used to subtract a single or multiple days from a particular date.
The NOT operator is a frequently used operator in Postgres that negates a boolean expression. It allows us to filter or exclude certain data from the query’s result set.
In PostgreSQL, the NUMERIC data type is a more precise data type used to store decimal values. It can be defined with specific precision and scale.
Postgres allows you to find the list of active connections on your database server via the "pg_stat_activity" and pgAdmin's "Server Activity panel”.
In Postgres, the “\l”, “\list”, and “pg_catalog” are used to show the list of databases, while the “\dt” and “pg_catalog.pg_table” are used to show the list of relations.
Postgres offers a wide range of built-in functions to efficiently manipulate date and time values. For instance, NOW(), TO_TIMESTAMP(), CURRENT_DATE, etc.
Postgres allows us to add a certain number of days to a date field using the plus “+” operator. It retrieve a new date representing the original date plus the specified number of days.
PostgreSQL provides two temporal data types to deal with the TIMESTAMPS: TIMESTAMP(without the time zone) and TIMESTAMPTZ(with a time zone).