Richard Stallman Resigns as President of the Free Software Foundation
fsfe.org1 pointsby feike0 comments
INSERT INTO tbl1 VALUES ($1, $2) \bind 'first value' 'second value' \g
https://www.postgresql.org/docs/current/app-psql.html#APP-PS... \set v_x 'first value'
\set v_y 'second value'
INSERT INTO tbl1 VALUES (:'v_x', :'v_y');
\set v_x 'next value'
INSERT INTO tbl1 VALUES (:'v_x', :'v_y'); 08:25:37.114 UTC [1456] LOG: statement: CREATE DATABASE "test_1675239937111796557" WITH template = test_template
[noise]
08:25:48.002 UTC [1486] LOG: statement: DROP DATABASE "test_1675239947937354435"
Start time of first test:
2023-02-01 08:25:03.633 UTC - we create a template database using the migrations
- for *every* integration test we do `CREATE DATABASE test123 TEMPLATE test_template;`
- we tune the PostgreSQL instance inside Docker to speed up things, for exampling disabling synchronous_commit
On a successful test, we drop the test123 database. On a failed test, we keep the database around, so we can inspect it a bit. WITH a AS (
insert into a (k, v) values ('a', 1.0) returning *
), b AS (
insert into b (k, v) values ('b', 2.0) returning *
)
SELECT
row_to_json(a)
FROM
a
UNION ALL
SELECT
row_to_json(b)
FROM
b;
Returns: row_to_json
--------------------------
{"a_id":1,"k":"a","v":1}
{"b_id":1,"k":"b","v":2}
(2 rows) SELECT
lineno::int AS line,
((lineno-3)/6)::smallint AS card,
((lineno-3)%6)::smallint AS y,
(col - 1)::smallint AS x,
value::smallint AS value
FROM
regexp_split_to_table($1, '\n') WITH ORDINALITY AS sub(line, lineno)
CROSS JOIN
regexp_split_to_table(ltrim(line, ' '), '(\s+|,)') WITH ORDINALITY AS sub2(value, col)
WHERE
line != ''
AND value != ''
I am therefore quite sad to see this happen. It won't be easy to get feature parity with this great product.
I sincerely hope this is a reversible decision, or perhaps the postgres project could even absorb it into contrib.