Skip to content

Commit f737ba6

Browse files
author
Nikita Malakhov
committed
Contrib module implements toaster for non-compressed bytea columns, which allows fast appending to existing bytea value. Appended tail stored directly in toaster pointer, if there is enough place to do it.
Note: patch modifies byteacat() to support contrib toaster. Added varlena changes for bytea_appendable_toaster and added bytea toaster to makefile 0005_bytea_appendable_toaster patch
1 parent f9968b2 commit f737ba6

File tree

9 files changed

+802
-2
lines changed

9 files changed

+802
-2
lines changed

contrib/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ SUBDIRS = \
1414
bloom \
1515
btree_gin \
1616
btree_gist \
17+
bytea_toaster \
1718
citext \
1819
cube \
1920
dblink \

contrib/bytea_toaster/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# contrib/bytea_toaster/Makefile
2+
3+
MODULE_big = bytea_toaster
4+
OBJS = \
5+
$(WIN32RES) \
6+
bytea_toaster.o
7+
8+
EXTENSION = bytea_toaster
9+
DATA = bytea_toaster--1.0.sql
10+
PGFILEDESC = "bytea_toaster - appendable bytea toaster"
11+
12+
REGRESS = bytea_toaster
13+
14+
ifdef USE_PGXS
15+
PG_CONFIG = pg_config
16+
PGXS := $(shell $(PG_CONFIG) --pgxs)
17+
include $(PGXS)
18+
else
19+
subdir = contrib/bytea_toaster
20+
top_builddir = ../..
21+
include $(top_builddir)/src/Makefile.global
22+
include $(top_srcdir)/contrib/contrib-global.mk
23+
endif
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/* contrib/bytea_toaster/bytea_toaster--1.0.sql */
2+
3+
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
4+
\echo Use "CREATE EXTENSION bytea_toaster" to load this file. \quit
5+
6+
CREATE FUNCTION bytea_toaster_handler(internal)
7+
RETURNS toaster_handler
8+
AS 'MODULE_PATHNAME'
9+
LANGUAGE C;
10+
11+
CREATE TOASTER bytea_toaster HANDLER bytea_toaster_handler;
12+
13+
COMMENT ON TOASTER bytea_toaster IS 'bytea_toaster is a appendable bytea toaster';

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy