Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used

From: John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com>
To: Poul Kristensen <bcc5226(at)gmail(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used
Date: 2016-11-21 15:15:11
Message-ID: CAAJSdjinub7JGjZtDo7q7CnJq627O6vdnusudJ3h-QdQZVbrYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Nov 21, 2016 at 8:56 AM, Poul Kristensen <bcc5226(at)gmail(dot)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.

Unicode: http://xkcd.com/1726/

Maranatha! <><
John McKown

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-11-21 15:24:13 Re: Partial update on an postgres upsert violates constraint
Previous Message Adrian Klaver 2016-11-21 15:11:41 Re: Postgresql 9.5 and Shell scripts/variables vs. C programming/defining a value to be used