Topics

PostgreSQL

About this topic: Articles tagged __TAG__

Showing 114 articles

Topics

Articles

Showing 114 articles

How-tos How to Drop Database Through PSQL in PostgreSQL This article describes how to drop a database through Psql in PostgreSQL. How-tos How to Terminate a PostgreSQL Connection This article describes how to terminate an opened connection in PostgreSQL. How-tos How to PostgreSQL - Check Date and Time Relative to Today This article demonstrates how to check the current date and time relative to today. How-tos How to Upsert (Merge, Insert on Duplicate Update) in PostgreSQL This article describes how to perform an upsert operation in PostgreSQL. How-tos Auto Increment Values in PostgreSQL Learn how PostgreSQL identity columns, SERIAL, and sequences generate identifier values. How-tos How to Transpose Columns to Rows in PostgreSQL Learn how to turn column-oriented values into rows in PostgreSQL with unnest(), and when crosstab() is the reverse operation. How-tos PostgreSQL Default Port PostgreSQL uses port 5432 by default. Learn how to identify the instance listening, connect on a chosen port, change its configuration, and diagnose connection mismatches. How-tos How to Connect to PostgreSQL With Password This article shows various methods for connecting PostgreSQL with password. It can be via command-line, pgpass file, PGPASSWORD environment variable or the connection string. How-tos How to Login and Authenticate to PostgreSQL Learn how to connect to a PostgreSQL database with psql, create a login role and database, and troubleshoot authentication failures. How-tos How to List All Tables in PostgreSQL List every table in a PostgreSQL database by querying the INFORMATION_SCHEMA views or by using psql table-listing meta-commands, and filter the results by schema. How-tos How to Start PostgreSQL Server on Windows This article teaches how to start a PostgreSQL server on Windows. How-tos How to Find and Delete Duplicate Records in a Database in PostgreSQL This article shows how to find duplicate records in a database and then delete them in PostgreSQL. How-tos How to Check if PostgreSQL Server Is Running on macOS This article mentions several BASH commands to check for the status of PostgreSQL. How-tos How to Use UTC Current Time as Default in PostgreSQL Learn how to get the current time in UTC and use it as a PostgreSQL column default. How-tos PostgreSQL Naming Conventions Learn a consistent way to name PostgreSQL databases, tables, sequences, keys, constraints, and indexes, and how quoted identifiers behave. How-tos How to Insert or Update if Exists in PostgreSQL In PostgreSQL, use INSERT ... ON CONFLICT to insert a row or update it when its key already exists. How-tos How to Select Random Rows in PostgreSQL This article teaches about the different ways we can select random rows in PostgreSQL. How-tos How to Write Case-Insensitive Queries in PostgreSQL Learn how to write case-insensitive text queries in PostgreSQL with ILIKE, normalized comparisons, indexes, and CITEXT. How-tos How to Subtract a Day From a Timestamp in PostgreSQL Subtract one day from a PostgreSQL timestamp with INTERVAL, or cast it to DATE when you want a date-only result. How-tos How to Run PostgreSQL Queries in PSQL Learn how to run SQL interactively, select a PostgreSQL database, use psql single-line mode, and execute a SQL file. How-tos How to Cast an Integer to String in PostgreSQL Learn to cast an integer to PostgreSQL text with CAST or the :: operator, and use CONCAT separately to combine text with values of other types. How-tos How to Declare a Variable in a PostgreSQL Query Learn how to pass a value to a PostgreSQL query with WITH, a PL/pgSQL DO block, or a custom setting, and understand each option's scope. How-tos Alternatives to DATEADD() in PostgreSQL This article discusses alternatives to DATEADD() in PostgreSQL. How-tos How to Extract Date From Timestamp in PostgreSQL This tutorial explains various ways to extract the date from a timestamp in PostgreSQL. Learn how to use the DATE, TO_CHAR, and EXTRACT functions with practical examples. Enhance …

← All topics