File tree Expand file tree Collapse file tree 4 files changed +408
-0
lines changed Expand file tree Collapse file tree 4 files changed +408
-0
lines changed Original file line number Diff line number Diff line change
1
+ # contrib/pageinspect/Makefile
2
+
3
+ MODULE_big = dump_stat
4
+ OBJS = anyarray_elemtype.o $(WIN32RES )
5
+
6
+ EXTENSION = dump_stat
7
+ DATA = dump_stat--1.0.sql
8
+ PGFILEDESC = "dump_stat - move pg_statistic to new instance of PostgreSQL"
9
+
10
+ ifdef USE_PGXS
11
+ PG_CONFIG = pg_config
12
+ PGXS := $(shell $(PG_CONFIG ) --pgxs)
13
+ include $(PGXS )
14
+ else
15
+ subdir = contrib/dump_stat
16
+ top_builddir = ../..
17
+ include $(top_builddir ) /src/Makefile.global
18
+ include $(top_srcdir ) /contrib/contrib-global.mk
19
+ endif
Original file line number Diff line number Diff line change
1
+ #include "postgres.h"
2
+ #include "utils/array.h"
3
+
4
+
5
+ PG_MODULE_MAGIC ;
6
+
7
+ PG_FUNCTION_INFO_V1 (anyarray_elemtype );
8
+
9
+
10
+ Datum
11
+ anyarray_elemtype (PG_FUNCTION_ARGS )
12
+ {
13
+ #if (PG_VERSION_NUM >= 90500 )
14
+ AnyArrayType * v = PG_GETARG_ANY_ARRAY (0 );
15
+ PG_RETURN_OID (AARR_ELEMTYPE (v ));
16
+ #else
17
+ ArrayType * v = PG_GETARG_ARRAYTYPE_P (0 );
18
+ PG_RETURN_OID (ARR_ELEMTYPE (v ));
19
+ #endif
20
+ }
You can’t perform that action at this time.
0 commit comments