PostgreSQL errors (80) — causes and fixes
80 PostgreSQL errors, each reproduced and fixed on a real database. Pick an error to see the actual output, the fix SQL and the result.
- PG080013 causescould not connect to server
- PG0A0004 causesfeature not supported
- PG210003 causesmore than one row returned by a subquery used as an expression
- PG220015 causesvalue too long for type character varying
- PG220034 causesnumeric field overflow
- PG220043 causesquery string argument of EXECUTE is null
- PG220074 causesinvalid input syntax for type date
- PG220085 causesdate/time field value out of range
- PG2200H3 causesnextval: reached maximum value of sequence
- PG220123 causesdivision by zero
- PG2201B3 causesinvalid regular expression
- PG220213 causesinvalid byte sequence for encoding "UTF8"
- PG220233 causescannot cast jsonb string to type numeric
- PG22P026 causesinvalid input syntax for type
- PG22P043 causesextra data after last expected column / missing data for column
- PG22P052 causescharacter with byte sequence has no equivalent in encoding
- PG235027 causesnull value in column violates not-null constraint
- PG235036 causesviolates foreign key constraint
- PG235056 causesduplicate key value violates unique constraint
- PG235144 causesnew row for relation "products" violates check constraint "products_price_check"
- PG23P013 causesconflicting key value violates exclusion constraint "bookings_during_excl"
- PG250014 causesactive SQL transaction (cannot run inside a transaction block)
- PG250063 causescannot execute UPDATE in a read-only transaction
- PG25P013 causescan only be used in transaction blocks
- PG25P024 causescurrent transaction is aborted, commands ignored until end of transaction block
- PG25P031 causesterminating connection due to idle-in-transaction timeout
- PG260003 causesprepared statement does not exist
- PG280004 causesno pg_hba.conf entry for host
- PG28P015 causespassword authentication failed for user
- PG2BP014 causescannot drop because other objects depend on it
- PG2D0003 causesinvalid transaction termination
- PG2F0053 causescontrol reached end of function without RETURN
- PG340003 causescursor does not exist
- PG3B0013 causessavepoint does not exist
- PG3D0004 causesdatabase does not exist
- PG3F0003 causesschema does not exist
- PG400012 causescould not serialize access due to concurrent update
- PG40P012 causesdeadlock detected
- PG425015 causespermission denied
- PG426016 causessyntax error at or near
- PG427013 causescolumn "id" specified more than once
- PG427024 causescolumn reference "id" is ambiguous (ambiguous_column)
- PG427035 causescolumn does not exist
- PG427044 causestype "citext" does not exist (undefined_object)
- PG427104 causesalready exists (duplicate_object)
- PG427122 causestable name specified more than once
- PG427233 causesfunction already exists with same argument types
- PG427253 causesfunction order_tax(integer) is not unique
- PG428034 causescolumn must appear in the GROUP BY clause or be used in an aggregate function
- PG428045 causesdatatype mismatch
- PG428094 causeswrong object type (is not a procedure, is not a table)
- PG428303 causesthere is no unique constraint matching given keys for referenced table
- PG428463 causescannot cast type integer to date
- PG428834 causesoperator does not exist / function does not exist
- PG428C94 causescannot insert a non-DEFAULT value into column
- PG42P015 causesrelation does not exist
- PG42P023 causesthere is no parameter $1
- PG42P042 causesdatabase already exists
- PG42P052 causesprepared statement "get_order" already exists
- PG42P062 causesschema already exists
- PG42P074 causesrelation already exists
- PG42P093 causestable reference is ambiguous
- PG42P104 causesthere is no unique or exclusion constraint matching the ON CONFLICT specification
- PG42P133 causescannot change return type of existing function
- PG42P163 causesmultiple primary keys for table are not allowed
- PG42P174 causesfunctions in index expression must be marked IMMUTABLE
- PG42P183 causescould not determine data type of parameter $1
- PG42P193 causesrecursive reference to query must not appear within an outer join
- PG42P203 causeswindow functions are not allowed in WHERE
- PG532002 causesout of shared memory
- PG533002 causestoo many connections for role
- PG540002 causesindex row size exceeds btree maximum 2704
- PG540012 causesstack depth limit exceeded
- PG550003 causescurrval of sequence is not yet defined in this session
- PG550062 causesdatabase "shop" is being accessed by other users
- PG55P035 causescanceling statement due to lock timeout
- PG570143 causescanceling statement due to statement timeout
- PG57P011 causesterminating connection due to administrator command
- PGP00023 causesquery returned no rows
- PGP00033 causesquery returned more than one row