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.AcceptRejectRead More
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.