A Second Step Into PostgreSQL Transactions
We started looking at PostgreSQL transactions last time , and now we can plunge onward. Populating a new table is an intense process. Besides the columns we declare, there are others created for us by the server. Please read the documentation on System Columns. First Example We start by creating a simple two-column table. demo=# create table foo (a int, b int); CREATE TABLE demo=# insert into foo (a,b) values (1,2),(3,4),(5,6); INSERT 0 3 demo=# select a,b from foo; a | b ---+--- 1 | 2 3 | 4 5 | 6 (3 rows) The server adds the system columns that can be seen if we explicitly select them. demo=# select a, b, tableoid, xmin, cmin, xmax, cmax, ctid from foo; a | b | tableoid | xmin | cmin | xmax | cmax | ctid ---+---+----------+------+------+------+------+------- 1 | 2 | 16401 | 776 | 0 | 0 | 0 | (0,1) 3 | 4 | 16401 | 776 | ...