Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used - Mailing list pgsql-general

From John McKown
Subject Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Date
Msg-id CAAJSdjinub7JGjZtDo7q7CnJq627O6vdnusudJ3h-QdQZVbrYQ@mail.gmail.com
Whole thread Raw
In response to Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used  (Poul Kristensen <bcc5226@gmail.com>)
List pgsql-general
On Mon, Nov 21, 2016 at 8:56 AM, Poul Kristensen <bcc5226@gmail.com> wrote:
Hi! 

Hopefully this is this list.

A shell variabel is  defined like this

var1= value

used like ${var1}.

How is the equal defened in the Postgresql C programming?

Thanks.

Poul

BTW: I have not received my ordered book yet!

Assuming I understand what you want, you want to write a program in the C language which interfaces with PostgreSQL. There are two methods to do this. One is to use libpq and do everything in "regular C" with calls to the libpq routines as documented here: https://www.postgresql.org/docs/9.5/static/libpq.html . This is, IMO, the more powerful interface, but it takes a lot more detailed programming on your part.
The second way is with "embedded SQL" which may be a bit easier to write, read, and understand. That is documented here: https://www.postgresql.org/docs/9.5/static/ecpg.html .​



--
Heisenberg may have been here.


Maranatha! <><
John McKown

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Next
From: Adrian Klaver
Date:
Subject: Re: Partial update on an postgres upsert violates constraint