Category: PostgreSQL

PostgreSQL ERROR: numeric field overflow

Numeric field overflow Create table CREATE TABLE test( id numeric(4,2) NOT NULL, description character varying(250), reg_date timestamp without time zone ); Wrong action insert into test (id, description, reg_date) values (123, 'test_dsp', now()); ERROR: numeric field overflow DETAIL: A field with...

PostgreSQL Relation does not exist

The cause of error: There is no table created with the specified name. Check the table name or use IF EXISTS. Wrong alter ALTER TABLE test.clients RENAME TO customers; Messages ERROR: relation “test.clients” does not exist Correct alter ALTER TABLE IF...

Value too long for type character varying or type numeric

PostgreSQL Value too long for type character varying or type numeric CREATE TABLE customers ( id numeric NOT NULL DEFAULT nextval('seq_customers'::regclass), first_name character varying(50), last_name character varying(50), account_id numeric(5), type character varying(2), reg_date timestamp without time zone DEFAULT now(), CONSTRAINT customers_pkey...

PostgreSQL tutorial

PostgreSQL, often referred to as Postgres, is an advanced open-source object-relational database management system (ORDBMS). PostgreSQL is known for its stability, reliability, and feature-richness, making it a preferred choice for many developers and organizations. PostgreSQL is written in the C programming...

PostgreSQL Create Trigger

PostgreSQL Create Trigger The PostgreSQL CREATE TRIGGER is used to create a trigger in a PostgreSQL database. Create Trigger syntax CREATE TRIGGER name { BEFORE | AFTER | INSTEAD OF } ON table_name [FOR [EACH] {ROW | STATEMENT}] EXECUTE PROCEDURE function_name(arguments);...