Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA09459; Mon, 22 Mar 93 19:37:15 -0800
Date: Mon, 22 Mar 93 19:37:15 -0800
Message-Id: <9303230337.AA09459@postgres.Berkeley.EDU>
From: Aswini Kumar Vallampati <vallam@pollux.cs.uga.edu>
Subject: Request information/corrections
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu



HELP !
main()
{
	printf("hello postgres world ! \n");
}

That should perhaps indicate that I am indeed a novice to
postgres programming. However, I have received a lot of 
errors which I couldnt figure out.

I have the following schema and a rule.  I do not know what
is wrong with it.  However, postgres (ver 4.0.1 on SunOS 4.1.2
on 490 SPARC) thinks something is.

create patsymdis (symptoms = char16[5],disease = char16)
create diseases(symptoms = char16[5],disease=char16)

append diseases (symptoms = "{headache,cold}","sinusitis")
append diseases (symptoms = "{nausea,restlessness}","pms")


define rule DiagnosisRule is
on append to patsymdis
do replace p (new.disease = diseases.disease)
    from p in patsymdis
     where (     (p.symptoms[1] = diseases.symptoms[1])
             and (p.symptoms[2] = diseases.symptoms[2])
             and (p.symptoms[3] = diseases.symptoms[3])
             and (p.symptoms[4] = diseases.symptoms[4])
             and (p.symptoms[5] = diseases.symptoms[5]))


append patsym (symptoms = "{headache,cold}")


It got the following :

1) postgres backend died on me

2) i got a "WARN:  bad type (lispRead) "

3) 

Query sent to backend is "define rule diagnrule is on append to patsymdis
		do replace p (disease = diseases.disease)     
		from p in patsymdis      
		where (     (p.symptoms[1] = diseases.symptoms[1])                                      and (p.symptoms[2] = diseases.symptoms[2])                                      and (p.symptoms[3] = diseases.symptoms[3])                                      and (p.symptoms[4] = diseases.symptoms[4])                                      and (p.symptoms[5] = diseases.symptoms[5]))         "
WARN:Mar 22 20:55:09:Sorry, rule diagnrule is already defined

Go 
* remove rule diagnrule \g

Query sent to backend is "remove rule diagnrule "
Error: No response from the backend, exiting...

{pollux}% monitor pres
Welcome to the C POSTGRES terminal monitor

Go 
* remove rule diagnrule \g

Query sent to backend is "remove rule diagnrule "
REMOVE
Go 

/* I dont know why it crashed when I tried to remove the rule */

4) And after I add the rule again and tried to add a tuple,


 append patsymdis (symptoms = "{headache,cold}") \g

Query sent to backend is "append patsymdis (symptoms = "{headache,cold}") "
Error: Unexpected identifier in process_portal: 


I would reallly appreciate anybody helping me out with this.  Are
there any special rules etc that I have to follow when I add ?
I am a beginner user of this system.  So, I might have made some
mistakes.  I would really appreciate someone teaching me something
about avoiding commonly made new-user mistakes.


Sincerely,


Aswini Kumar Vallampati
(vallam@pollux.cs.uga.edu)
+--------------------------------------+--------------------------------------+
|     201 Stonemill Run                | Computer Science Department          |
|     Apt 3                            | 415 Graduate Studies Research Center |
|     Athens, GA 30605                 | The University of Georgia,           |
|     (706) 546 - 4703                 | Athens, GA 30602-2911                |
|                                      | (706) 542 - 2911                     |
+--------------------------------------+--------------------------------------+
