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
regress=> DELETE FROM t USING t2 WHERE t.id = t2.id; | |
LOG: parse tree: | |
DETAIL: {QUERY | |
:commandType 4 | |
:querySource 0 | |
:canSetTag true | |
:utilityStmt <> | |
:resultRelation 1 | |
:hasAggs false | |
:hasWindowFuncs false |
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
craig=> DO | |
$$ | |
BEGIN | |
PERFORM (ARRAY[1])[1]; | |
END; | |
$$ LANGUAGE plpgsql; | |
with a breakpoint set at ExecEvalArrayRef results in: | |
(gdb) bt |
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 <craig@2ndquadrant.com> | |
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
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