diff --git a/src/test/examples/Makefile b/src/test/examples/Makefile index a67f456904..4bcc2f88df 100644 --- a/src/test/examples/Makefile +++ b/src/test/examples/Makefile @@ -14,7 +14,7 @@ override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) LDFLAGS_INTERNAL += $(libpq_pgport) -PROGS = testlibpq testlibpq2 testlibpq3 testlibpq4 testlo testlo64 +PROGS = testlibpq testlibpq2 testlibpq3 testlibpq4 testlo testlo64 testfloat4 all: $(PROGS) diff --git a/src/test/examples/testfloat4.c b/src/test/examples/testfloat4.c new file mode 100644 index 0000000000..a2256f067d --- /dev/null +++ b/src/test/examples/testfloat4.c @@ -0,0 +1,35 @@ +/* + * Include the same headers as + * src/backend/utils/adt/numeric.c + */ +#include "postgres.h" + +#include +#include +#include +#include + +#include "access/hash.h" +#include "catalog/pg_type.h" +#include "common/int.h" +#include "funcapi.h" +#include "lib/hyperloglog.h" +#include "libpq/pqformat.h" +#include "miscadmin.h" +#include "nodes/nodeFuncs.h" +#include "utils/array.h" +#include "utils/builtins.h" +#include "utils/float.h" +#include "utils/guc.h" +#include "utils/int8.h" +#include "utils/numeric.h" +#include "utils/sortsupport.h" + +int +main() +{ + char *tmp = "3.14"; + // undefined reference + DirectFunctionCall1(float4in, CStringGetDatum(tmp)); + return 0; +}