From: | "Joel Jacobson" <joel(at)compiler(dot)org> |
---|---|
To: | "jian he" <jian(dot)universality(at)gmail(dot)com> |
Cc: | "Tomas Vondra" <tomas(dot)vondra(at)enterprisedb(dot)com>, "Tom Dunstan" <pgsql(at)tomd(dot)cc>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Do we want a hashset type? |
Date: | 2023-06-15 15:55:56 |
Message-ID: | 551f2f29-cefe-4508-a5f3-c9af7750b299@app.fastmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
Attachment | Content-Type | Size |
---|---|---|
hashset-0.0.1-bb0ece8.patch | application/octet-stream | 3.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2023-06-15 16:12:27 | Re: run pgindent on a regular basis / scripted manner |
Previous Message | Jelte Fennema | 2023-06-15 15:26:58 | Re: run pgindent on a regular basis / scripted manner |