agora inbox for [email protected]  
help / color / mirror / Atom feed
From: Casey Claiborne <[email protected]>
To: David S. Kenzik <[email protected]>
To: [email protected]
Subject: Re: Problem using external SQL calls.
Date: Sat, 5 Aug 1995 20:22:43 -0500
Message-ID: <[email protected]> (raw)

How were you able to use SQL statements. What version do you have?
I would always have to use something like "retrieve (person.all)" to get the 
data
that you have. 

I, myself, used a "C" interface and I was able to get data back that way. There
are examples (similar to the one you have below, except written in "C") in the 
directory holding sample code.

Also, if I remember correctly, you can also check 
"manual.ps" or "manual.txt" or one of these files that hold the references to
the types of commands that are available as a part of Postgres, there is an
area that discusses the "retrieve" command. There is also some "C" code that
goes with the explanation. That part helped me out a *whole* lot - there were
a lot of examples.

I know that you are using perl. I was just providing another option.

Good Luck :-)

Casey

   

At 04:01 PM 8/5/95, David S. Kenzik wrote:
>
>I am using Postgre95 beta 0.02 along with PGperl5 in a Solaris 2.4 
>environment.
>
>I have created a database called 'dbtest', set up a couple fields, and 
>entered 1 row of data.
>
>Monitor output follows:
>
>----------------------
>bash$ monitor dbtest
>Welcome to the POSTGRES95 terminal monitor
>
>Go 
>* select * from person;
>
>Query sent to backend is "select * from person;"
>-----------------------------
>| name        | age         |
>-----------------------------
>| dave        | 10          |
>-----------------------------
>
>---------------------
>
>I have a script written in perl 5 using PGpm that doesn't return any 
>value, except 'PGblank'. The code follows:
>
>---------------------
>
>#!/usr/bin/perl
>use Pg;
>$db="dbtest";
>PQsetdb($db);
>$query="select * from person";
>$result=PQexec($query);
>print "$result\n";
>
>And the results:
>
>bash$ ./dbtest2
>Pblank
>
>-----------------
>
>Any insight would be greatly appreciated, as it's been a long couple of 
>days. :)
>
>
>Regards,
>
>.===========================================================================.
>| David S. Kenzik - Project Director - OneNet Communications : [email protected] |
>+===========================================================================+
>| Current Projects: finger [email protected]         WWW: http://www.one.net |
>| Information: [email protected] 	                    Phone: (513) 326-6000   |
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
>==============================================================================
>   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
>   the subject line ADD or DEL to "[email protected]".
>   If this fails, send mail to "[email protected]" and
>   a human will deal with it.  DO NOT post to the "postgres" mailing list.
>==============================================================================
>              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
>
>
Casey Claiborne [email protected]

One must note the importance of setting reasonable and achievable goals for
                    "If you aim for nothing, you'll hit it every time" 
                               -Theodore Roosevelt


==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "[email protected]".
   If this fails, send mail to "[email protected]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================
              URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Problem using external SQL calls.
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox