Skip to content

Instantly share code, notes, and snippets.

View samuelhorwitz's full-sized avatar

Samuel Horwitz samuelhorwitz

View GitHub Profile
@samuelhorwitz
samuelhorwitz / break-it.sql
Last active October 26, 2017 18:46
JSON building/stored procedure/view indirection segmentation fault affecting Postgres 9 and 10
ALTER TABLE base_table ADD COLUMN new_column boolean NOT NULL DEFAULT false;
CREATE OR REPLACE VIEW base_table_view AS SELECT base_table.*
FROM base_table;
CREATE OR REPLACE FUNCTION get_base_table_json(el anyelement) RETURNS json
LANGUAGE plpgsql
AS $$ BEGIN
RETURN json_build_object(
'id', el.id,

Keybase proof

I hereby claim:

  • I am samuelhorwitz on github.
  • I am samuelhorwitz (https://keybase.io/samuelhorwitz) on keybase.
  • I have a public key ASAlKzVrtpufpI6Ja5VWhDKR3U-mAML5ihemDcdrsF0MwAo

To claim this, I am signing this object:

/* build: `node build.js modules=ALL minifier=uglifyjs` */
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "1.6.4" };
if (typeof exports !== 'undefined') {
exports.fabric = fabric;
}
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
fabric.document = document;
/* build: `node build.js modules=ALL minifier=uglifyjs` */
/*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */
var fabric = fabric || { version: "1.6.3" };
if (typeof exports !== 'undefined') {
exports.fabric = fabric;
}
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
fabric.document = document;