Reviewed-by: David Steele <david@pgmasters.net>
--- /dev/null
+# Generated subdirectories
+/log/
+/results/
+/tmp_check/
SHLIB_LINK = $(filter -lcrypt, $(LIBS))
+REGRESS = chkpass
+
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
--- /dev/null
+CREATE EXTENSION chkpass;
+WARNING: type input function chkpass_in should not be volatile
+CREATE TABLE test (i int, p chkpass);
+INSERT INTO test VALUES (1, 'hello'), (2, 'goodbye');
+SELECT i, p = 'hello' AS "hello?" FROM test;
+ i | hello?
+---+--------
+ 1 | t
+ 2 | f
+(2 rows)
+
+SELECT i, p <> 'hello' AS "!hello?" FROM test;
+ i | !hello?
+---+---------
+ 1 | f
+ 2 | t
+(2 rows)
+
--- /dev/null
+CREATE EXTENSION chkpass;
+
+CREATE TABLE test (i int, p chkpass);
+INSERT INTO test VALUES (1, 'hello'), (2, 'goodbye');
+
+SELECT i, p = 'hello' AS "hello?" FROM test;
+SELECT i, p <> 'hello' AS "!hello?" FROM test;