Get primary key of a table through SPI

2022-03-24 Thread Oskar Stenberg
Hi! I need to get the primary keys of a few tables for some code that I'm writing in C. I've found out how to do this through regular SQL code and I know that I can use that SQL code through the SPI. But I was just wondering if there is a better/faster way to get information like this directly

RE: Working with fixed-point calculations in C

2021-12-08 Thread Oskar Stenberg
thing else? Best Regards Oskar Originalmeddelande Från: Tom Lane Datum: 2021-12-08 04:41 (GMT+01:00) Till: Oskar Stenberg Kopia: pgsql-general@lists.postgresql.org Ämne: Re: Working with fixed-point calculations in C Oskar Stenberg writes: > I need to make some fixed-point

Working with fixed-point calculations in C

2021-12-07 Thread Oskar Stenberg
Hi! I need to make some fixed-point calculations inside the C code that I'm developing as an extension to PostgreSQL. I was reading a bit, and if I understood the datatype NUMBER correctly, it seems to be just what I'm looking for, a fixed-point datatype. (I couldn't actually find any thing in the

Re: Where can I find the pg_config binary in PostgreSQL 14?

2021-10-01 Thread Oskar Stenberg
Never mind... I found it! For anyone else that has the same problem:  It had been moved to "/usr/pgsql-14/bin/pg_config" Sorry for disturbing everyone with this... *Facepalm* On Fri, 2021-10-01 at 12:12 +0200, Oskar Stenberg wrote: > Hi! > > I'm developing an applicatio

Where can I find the pg_config binary in PostgreSQL 14?

2021-10-01 Thread Oskar Stenberg
Hi! I'm developing an application with PostgreSQL as the database. But during the compilation I need to use pg_config to get the paths of the other PostgreSQL files. But since upgrading to PostgreSQL 14 I can't find it anymore. Earlier I got this binary from libpq-devel (I'm using fedora as my wor