agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
Re: append
4+ messages / 4 participants
[nested] [flat]

* append
@ 1992-07-08 13:08 Sudheer R. Vangati <sud@philabs.Philips.Com>
  1992-07-08 08:47 ` Re: append mao@postgres.berkeley.edu
  0 siblings, 1 reply; 4+ messages in thread

From: Sudheer R. Vangati @ 1992-07-08 13:08 UTC (permalink / raw)
  To: legacy; +Cc: mummy!sud@uunet.UU.NET

I am saving all the tuple values in an array and then trying to append
using the PQexec function.
1) only the first four characters of the tuple value is getting stored
under a field.
2) it is not recognizing the where qualification (when I use append in the
Pqexec  function).It works fine (i.e recognizes the where qualification)
when I use replace instead of append.

Am I missing something?
By the way, all my fields are of type text.
Thanx in advance.



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: append
  1992-07-08 13:08 append Sudheer R. Vangati <sud@philabs.Philips.Com>
@ 1992-07-08 08:47 ` mao@postgres.berkeley.edu
  0 siblings, 0 replies; 4+ messages in thread

From: mao@postgres.berkeley.edu @ 1992-07-08 08:47 UTC (permalink / raw)
  To: legacy

In message <9207081308.AA08532@postgres.Berkeley.EDU> you write:

> 1) only the first four characters of the tuple value is getting stored
> under a field.

> 2) it is not recognizing the where qualification (when I use append in the
> Pqexec  function).It works fine (i.e recognizes the where qualification)
> when I use replace instead of append.

it's not clear what you're describing here.  could you send us the
program you're having trouble with?

in general, append doesn't take a qualification unless you refer to
other tables in the target list.
					mike olson
					project sequoia 2000
					uc berkely
					mao@cs.berkeley.edu



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* append
@ 1994-09-21 07:01 Praveen Mamnani <pmamnani@cs.nmsu.edu>
  1994-09-21 07:49 ` Re: append Paul M. Aoki <aoki@cs.berkeley.edu>
  0 siblings, 1 reply; 4+ messages in thread

From: Praveen Mamnani @ 1994-09-21 07:01 UTC (permalink / raw)
  To: legacy


I tried to execute append using libpq PQexec command :
 
it does work if I use integer as an attribute to my class. 
 
The problem arises when I try to use character string , as follows :
 
PQexec("create Info (name=char16, login=char16, age=int4)");     
    PQexec("append Info (name=""david"", login=""dwill"", age=20)");  
 
I have to put the double quotes around the name and login otherwise
I get a syntax error.
 
When I try to run the following in a Program, at execution I get 
the error :
           
type id lookup of 362 failed.
 
I get this similar error, when using frontend monitor (not libpq) when
I do not put any "" around the name and the login as follows :
 
Query sent to backend is "append info(name=joe, login=d, age=2)"
WARN:Sep 21 00:54:12:type id lookup of 362 failed
 
But this does work if I put quotes around joe and d.
 
I am not able to figure out what I am doing wrong syntactically
when using libpq (as shown above).
 
anyones help would be appreciated. 
 
Thank You.
 
Praveen.


==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: append
  1994-09-21 07:01 append Praveen Mamnani <pmamnani@cs.nmsu.edu>
@ 1994-09-21 07:49 ` Paul M. Aoki <aoki@cs.berkeley.edu>
  0 siblings, 0 replies; 4+ messages in thread

From: Paul M. Aoki @ 1994-09-21 07:49 UTC (permalink / raw)
  To: Praveen Mamnani <pmamnani@cs.nmsu.edu>; +Cc: legacy

pmamnani@cs.nmsu.edu (Praveen Mamnani) writes:
>     PQexec("append Info (name=""david"", login=""dwill"", age=20)");  
> I have to put the double quotes around the name and login otherwise
> I get a syntax error.

the way to escape the double-quote character in C is to use a backslash:
	PQexec("append Info (name=\"david\", login=\"dwill\", age=20)");

try this:

faerie:aoki (149)> cat foo.c
main()
{
  printf("%s\n", "this""is""my""string");
  printf("%s\n", "this\"is\"my\"string");
}
faerie:aoki (150)> cc foo.c
faerie:aoki (151)> a.out
thisismystring
this"is"my"string
faerie:aoki (152)> 
--
  Paul M. Aoki          |  University of California at Berkeley
  aoki@CS.Berkeley.EDU  |  Dept. of EECS, Computer Science Division (#1776) 
                        |  Berkeley, CA 94720-1776

==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~1994-09-21 07:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1992-07-08 13:08 append Sudheer R. Vangati <sud@philabs.Philips.Com>
1992-07-08 08:47 ` mao@postgres.berkeley.edu
1994-09-21 07:01 append Praveen Mamnani <pmamnani@cs.nmsu.edu>
1994-09-21 07:49 ` Paul M. Aoki <aoki@cs.berkeley.edu>

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