This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN; | |
SET LOCAL bdr.skip_ddl_locking=on; | |
SET LOCAL bdr.skip_ddl_replication=on; | |
CREATE OR REPLACE FUNCTION public.simple_log_row() | |
RETURNS trigger LANGUAGE plpgsql | |
SET search_path = 'pg_catalog' | |
AS $$ | |
BEGIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Phys rep Phys rep | |
using phys using | |
slot "B" phys slot "C" | |
+-------+ +--------+ +-------+ | |
T | A <^--------+ B <---------+ C | | |
I | | | | | | | |
M +-------+ +--------+ +-------+ | |
E | | | | |
| | | |CREATEs | |
| | | |logical slot X |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a7a69e8dc87504163222ba2570bda6920114a5c3 Mon Sep 17 00:00:00 2001 | |
From: Craig Ringer <craig@redacted> | |
Date: Sun, 26 Jun 2016 19:58:48 +0800 | |
Subject: [PATCH] SPK utils build fixes | |
--- | |
.gitignore | 4 ++++ | |
src/SPK/File_IO.cpp | 2 ++ | |
src/SPK/Makefile | 9 +++++---- | |
src/SPK/String.h | 3 +++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "postgres.h" | |
#include "fmgr.h" | |
PG_MODULE_MAGIC; | |
PGDLLEXPORT Datum pg_elephant(PG_FUNCTION_ARGS); | |
PG_FUNCTION_INFO_V1(pg_elephant); | |
static const char * const elephant = | |
"............MMMMMMMMMMM8..........MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM ...........\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE book_lines | |
( | |
id serial primary key, | |
book_line text not null | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
# coding=utf-8 | |
# | |
# usage: python jpegify.py *.pdf | |
# | |
# Written for Python 2 or python 3 | |
from __future__ import print_function | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Disconnect/reconnect each query | |
# | |
# Takes 0.45s to run here | |
# | |
import time | |
import psycopg2 | |
start_t = time.time() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 0319a7ecbab5c1e85e300d93f674087786be144a Mon Sep 17 00:00:00 2001 | |
From: Craig Ringer <[email protected]> | |
Date: Wed, 1 Apr 2015 10:46:29 +0800 | |
Subject: [PATCH] pg_restore -t should select views, matviews, and foreign | |
tables | |
Currently pg_restore's '-t' option selects only tables, not other | |
relations. It should be able to match anything that behaves like | |
a relation in the relation namespace, anything that's interchangable | |
with a table, including: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Simpler version that assumes there is no active tx or snapshot and SPI isn't connected yet */ | |
const char * some_sql = "SELECT 1;"; | |
/* setup */ | |
Assert(!IsTransactionState()); | |
StartTransactionCommand(); | |
SetCurrentStatementStartTimestamp(); | |
SPI_connect(); | |
PushActiveSnapshot(GetTransactionSnapshot()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE SCHEMA myschema; | |
CREATE TABLE myschema.zzafter(id integer); | |
CREATE OR REPLACE FUNCTION myschema.aabefore() | |
RETURNS void | |
LANGUAGE plpgsql | |
AS $$ | |
DECLARE | |
somefield myschema.zzafter.id%TYPE; |
NewerOlder