Skip to content

Instantly share code, notes, and snippets.

💭
☕️

Daniel Gustafsson danielgustafsson

💭
☕️
Block or report user

Report or block danielgustafsson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View online_checksums.patch
From c8b2baf97cf85a36dd50de5fdd9293c5f6a11f17 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Thu, 26 Mar 2020 14:40:23 +0100
Subject: [PATCH 1/2] Enable checksums online v15
---
doc/src/sgml/func.sgml | 65 ++
doc/src/sgml/monitoring.sgml | 4 +
doc/src/sgml/ref/initdb.sgml | 1 +
doc/src/sgml/wal.sgml | 99 ++
View level.diff
diff --git a/postgresqleu/confsponsor/invoicehandler.py b/postgresqleu/confsponsor/invoicehandler.py
index a4614c09..372bdc71 100644
--- a/postgresqleu/confsponsor/invoicehandler.py
+++ b/postgresqleu/confsponsor/invoicehandler.py
@@ -57,7 +57,7 @@ class InvoiceProcessor(object):
send_simple_mail(conference.sponsoraddr,
conference.sponsoraddr,
"Confirmed sponsor: %s" % sponsor.name,
- "The sponsor\n%s\nhas completed payment of the sponsorship invoice,\nand is now activated.\nBenefits are not claimed yet." % sponsor.name,
+ "The sponsor\n%s\nhas completed payment of the sponsorship invoice,\n for level %s and is now activated.\nBenefits are not claimed yet." % (sponsor.name, sponsor.level),
View comments_inline.patch
From 7e8f0a7e6d38f8d362faef28ed00cf432fd0a267 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Mon, 1 Apr 2019 16:02:28 +0200
Subject: [PATCH] Add COMMENT IS for columns in create/alter table
This adds support for a MySQL-like syntax for setting comments on
relation attributes during CREATE|ALTER TABLE statements:
CREATE TABLE t (a int COMMENT IS 'Column a');
ALTER TABLE t ADD COLUMN b int COMENT IS 'Column c';
View pg_column_comment.diff
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index 166078410c..ff3cbb7acb 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -22,7 +22,7 @@ PostgreSQL documentation
<refsynopsisdiv>
<synopsis>
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] <replaceable class="parameter">table_name</replaceable> ( [
- { <replaceable class="parameter">column_name</replaceable> <replaceable class="parameter">data_type</replaceable> [ COLLATE <replaceable>collation</replaceable> ] [ <replaceable class="parameter">column_constraint</replaceable> [ ... ] ]
+ { <replaceable class="parameter">column_name</replaceable> <replaceable class="parameter">data_type</replaceable> [ COLLATE <replaceable>collation</replaceable> ] [ <replaceable class="parameter">column_constraint</replaceable> [ ... ] ] [ COMMENT <replaceable>comment_text</replaceable> ]
View minvotes.diff
diff --git a/postgresqleu/confreg/feedback.py b/postgresqleu/confreg/feedback.py
index d16c5d5d..4ea9d845 100644
--- a/postgresqleu/confreg/feedback.py
+++ b/postgresqleu/confreg/feedback.py
@@ -83,10 +83,10 @@ def feedback_sessions(request, confname):
toplists = []
# Start with top sessions
- toplists.extend(build_toplists('Sessions', "SELECT s.title || ' (' || (SELECT string_agg(fullname, ', ') FROM confreg_speaker spk INNER JOIN confreg_conferencesession_speaker css ON css.speaker_id=spk.id WHERE css.conferencesession_id=s.id) || ')', avg(fb.{{key}}), count(*), stddev(fb.{{key}}) FROM confreg_conferencesessionfeedback fb INNER JOIN confreg_conferencesession s ON fb.session_id=s.id WHERE s.conference_id=%s AND fb.{{key}}>0 GROUP BY s.id HAVING count(*)>%s ORDER BY 2 DESC" % (conference.id, minvotes)))
+ toplists.extend(build_toplists('Sessions', "SELECT s.title || ' (' || (SELECT string_agg(fullname, ', ') FROM confreg_speaker spk INNER JOIN confreg_conferencesession_speaker css ON css.spea
View urlapi.diff
diff --git a/lib/urlapi.c b/lib/urlapi.c
index 5cbda6a98..e68748818 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -534,6 +534,14 @@ UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, char *hostname)
long port;
char portbuf[7];
+ /* Browser behavior adaptation. If there's a colon with no digits after,
+ just cut off the name there which makes us ignore the colon and just
@danielgustafsson
danielgustafsson / 0001-ntlm-Remove-redundant-ifdef-USE_OPENSSL.patch
Created Nov 19, 2018
0001-ntlm-Remove-redundant-ifdef-USE_OPENSSL.patch
View 0001-ntlm-Remove-redundant-ifdef-USE_OPENSSL.patch
From 9d75b63dce94cfd14c89ad487f8835a374a65826 Mon Sep 17 00:00:00 2001
From: pkubaj <pkubaj@users.noreply.github.com>
Date: Wed, 14 Nov 2018 12:12:34 +0000
Subject: [PATCH] ntlm: Remove redundant ifdef USE_OPENSSL
lib/curl_ntlm.c had code that read as follows:
#ifdef USE_OPENSSL
# ifdef USE_OPENSSL
# else
View axtls_removal.diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d7ad6caa1..bdd8c3f8b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -291,7 +291,7 @@ if(WIN32)
endif()
# check SSL libraries
-# TODO support GNUTLS, NSS, POLARSSL, AXTLS, CYASSL
+# TODO support GNUTLS, NSS, POLARSSL, CYASSL
View curl-config.c.patch
From 7149a19ad877ac873c3c5648ed666895f3d42c27 Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <daniel@yesql.se>
Date: Sun, 21 Oct 2018 23:53:18 +0200
Subject: [PATCH] curl-config: reimplement app in C
There has been portability concerns raised over the sh implementation
of curl-config, mainly in stripped down cloud environments were commands
such as bc aren't guaranteed to be avialable. This reimplements the app
in C with no external dependencies to get around this. No functinality
should be altered by this.
View gist:64350f30a1557d18415d1ca875851c73
diff --git a/lib/curl_ntlm_wb.c b/lib/curl_ntlm_wb.c
index 949c7fa17..e3f4d5805 100644
--- a/lib/curl_ntlm_wb.c
+++ b/lib/curl_ntlm_wb.c
@@ -324,6 +324,8 @@ static CURLcode ntlm_wb_response(struct connectdata *conn,
conn->response_header = aprintf("NTLM %.*s", len_out - 4, buf + 3);
free(buf);
+ if (!conn->response_header)
+ return CURLE_OUT_OF_MEMORY;
You can’t perform that action at this time.