On Thu, Jun 15, 2023, at 11:44, jian he wrote: > I didn't install the extension directly. I copied the > hashset--0.0.1.sql to another place, using gcc to compile these > functions. .. > Because even make > PG_CONFIG=/home/jian/postgres/2023_05_25_beta5421/bin/pg_config still > has an error. > fatal error: libpq-fe.h: No such file or directory > 3 | #include <libpq-fe.h>
What platform are you on? You seem to be missing the postgresql dev package. For instance, here is how to compile and install the extension on Ubuntu 22.04.1 LTS: sudo apt install postgresql-15 postgresql-server-dev-15 postgresql-client-15 git clone https://github.com/tvondra/hashset.git cd hashset make sudo make install make installcheck > Is there any way to put test_send_recv.c to sql test file? Unfortunately, there doesn't seem to be a way to test *_recv() functions from SQL, since they take `internal` as input. The only way I could figure out to test them was to write a C-program using libpq's binary mode. I also note that the test_send_recv test was broken; I had forgot to change the type from "hashset" to "int4hashset". Fixed in attached commit. On Ubuntu, you can now run the test by specifying to connect via the UNIX socket: PGHOST=/var/run/postgresql make run_c_tests cd test/c_tests && ./test_send_recv.sh test test_send_recv ... ok > Attached is a patch slightly modified README.md. feel free to change, > since i am not native english speaker... > Attachments: > * 0001-add-instruction-using-PG_CONFIG-to-install-extension.patch Thanks, will have a look later. /Joel
hashset-0.0.1-bb0ece8.patch
Description: Binary data