Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update to fit recommended dir structure for PGXN.

  • Loading branch information...
commit 0e5fa5ae927e7d5fb7f3fcca515f59a1ad7f1719 1 parent 8075e77
Tomas Vondra authored
4 META.json
View
@@ -14,10 +14,6 @@
},
"provides": {
"query_histogram": {
- "file": "query_histogram--1.0.sql",
- "version": "1.0.0"
- },
- "query_histogram": {
"file": "query_histogram--1.1.sql",
"version": "1.1.0"
}
10 Makefile
View
@@ -1,8 +1,8 @@
MODULE_big = query_histogram
-OBJS = query_histogram.o queryhist.o
+OBJS = src/query_histogram.o src/queryhist.o
EXTENSION = query_histogram
-DATA = query_histogram--1.0.sql
+DATA = sql/query_histogram--1.1.sql
MODULES = query_histogram
CFLAGS=`pg_config --includedir-server`
@@ -13,8 +13,6 @@ include $(PGXS)
all: query_histogram.so
-query_histogram.so: query_histogram.o queryhist.o
+query_histogram.so: $(OBJS)
-queryhist.o : queryhist.c
-
-query_histogram.o: query_histogram.c
+%.o : src/%.c
17 query_histogram--1.0.sql
View
@@ -1,17 +0,0 @@
-CREATE OR REPLACE FUNCTION query_histogram( IN scale BOOLEAN DEFAULT TRUE, OUT bin_from INT, OUT bin_to INT, OUT bin_count BIGINT, OUT bin_count_pct REAL,
- OUT bin_time DOUBLE PRECISION, OUT bin_time_pct REAL)
- RETURNS SETOF record
- AS 'MODULE_PATHNAME', 'query_histogram'
- LANGUAGE C IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION query_histogram_reset()
- RETURNS void
- AS 'MODULE_PATHNAME', 'query_histogram_reset'
- LANGUAGE C IMMUTABLE;
-
-CREATE OR REPLACE FUNCTION query_histogram_get_reset()
- RETURNS timestamp
- AS 'MODULE_PATHNAME', 'query_histogram_get_reset'
- LANGUAGE C IMMUTABLE;
-
-CREATE OR REPLACE VIEW query_histogram AS SELECT histogram.*, round(1000000*bin_time/(CASE WHEN bin_count > 0 THEN bin_count ELSE 1 END))/1000 AS bin_time_avg FROM query_histogram(true) histogram;
0  query_histogram--1.1.sql → sql/query_histogram--1.1.sql
View
File renamed without changes
0  query_histogram.c → src/query_histogram.c
View
File renamed without changes
0  queryhist.c → src/queryhist.c
View
File renamed without changes
0  queryhist.h → src/queryhist.h
View
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.