This very simple example shows how to use ARRAYs in tables and in selects: create table temp.arraytest ( id bigserial, fks bigint[] ); create table temp.fks ( id bigserial, something text ); insert into temp.fks (something) values ('line1'),('line2'),('line3'); select...
If something happened and you PostgreSQL database crashed and corrupted data or your filesystem crashed and corrupted data files and you must check what is missing then you may appreciate this procedure which checks data files for every table on all databases (except...
This query shows you biggest database objects over all databases – size is taken from size of its data file therefore you see how big object on your disk really is: with dbs as (select datname as databasename, lnk.* from pg_database db join lateral (select *...
This text is based on my experience with PG 8.4 and 9.3. Here are some useful selects: Show row count pro every child table: select c.relname, count(*) from schemaname.parent_table m join pg_class c on m.tableoid=c.oid group by c.relname or this...
In Oracle we have system column ROWID which something like “address of the row id Oracle datafile”. This ROWID is unique because beside of table and row signature it contains also signature of datafile. Oracle stores everything in big datafiles and have...
This article summarizes information I have about this problem. I know that this is not all but I did not find such a summarization anywhere therefore I place it here. Maybe it could help to someone. Transaction ID has 32 bits. It means that after ID 2147483648...
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More Privacy & Cookies Policy