Return-Path: postman 
Delivery-Date: Wed, 15 Sep 93 22:46:14 PDT
Return-Path: postman
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA23822; Wed, 15 Sep 93 22:43:59 -0700
Resent-From: postman (POSTGRES mailing list)
Resent-Message-Id: <9309160543.AA23822@postgres.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: SRIRAMK@charlie.usd.edu
Received: from charlie.usd.edu by postgres.Berkeley.EDU (5.61/1.29)
	id AA23814; Wed, 15 Sep 93 22:43:53 -0700
Date: Thu, 16 Sep 1993 0:50:43 -0500 (CDT)
From: SRIRAMK@charlie.usd.edu
To: postgres@postgres.Berkeley.EDU
Cc: SRIRAMK@charlie.usd.edu
Message-Id: <930916005043.dc34@charlie.usd.edu>
Subject: Updating tuple attributes with vars from C program
Resent-To: postgres-dist
Resent-Date: Wed, 15 Sep 93 22:43:58 PDT

I am just starting to work with  Postgres as the platform for my
masters' thesis project.

I am facing the following problem, and would very much appreciate if someone 
could clarify the same :

   I have not been able to update tuples of a class, with values from
   variables  in my C program.  I give below a simplified version of the
   program segment I used.

#include <stdio.h>
#include "/home/coyote/postgres/src/backend/libpq.h"

main()

{
  int x = 4;
  int y = 6;

  PQsetdb("foo");

  PQexec("create testclass (a=int4, b=int4)"); 
  PQexec("copy testclass from stdin"); 

  PQputline(x	y);
  PQputline (".\n");

  PQfinish ();

}

The program compiles sucessfully and runs. However the attributes 
a and b in the class do not get updated with the values in x and y.

Any clarification on the above would be very helpful to me.

My user id is sriramk@charlie.usd.edu

Sriram Kal.




