Subject: HELP !!!!!

From: [email-masked] (Ludhi Sidikpramana)
Date: Wed, 27 May 92 07:15:43 -0700

----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 50

Hi, could anyone tell me what I did wrong either in installation or 
in my postquel progs.

Installation: SUN Sparc II station running SunOS 4.1.1
-------------
% cd newconf; ./Make install -> sparc

It compiled successfully!

The database:
* retrieve (emp.all) \g
 
Query sent to backend is "retrieve (emp.all) "
---------------------------------------------------------
| name        | office      | phone       | salary      |
---------------------------------------------------------
| ludhi       | D-256       | (null)      | 200         |
---------------------------------------------------------
| ludhi       | D-255       | (null)      | 200         |
---------------------------------------------------------

where name=char[], office=char[],  phone=char[], salary=int4

Postquel:
---------
Problem: It seems that I cannot do strings comparison
EG:  retrieve (emp.office) where emp.name="ludhi" \g
Query sent to backend is "retrieve (emp.office) where emp.name="ludhi" "
WARN:May 27 09:09:10:OperatorDef: no operator =

I thought that postgres has the basic operator for strings equality. It works 
fine for int4

* retrieve (emp.office) where emp.salary=200\g
 
Query sent to backend is "retrieve (emp.office) where emp.salary=200"
---------------
| office      |
---------------
| D-256       |
---------------
| D-255       |
--------------

Attached is the script.....

Thanks
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: pg.problems
X-Sun-Content-Lines: 109

Script started on Wed May 27 08:36:38 1992
Ra% createdb junk
Ra% monitor junk
Welcome to the C POSTGRES terminal monitor

Go 
* create (name=char[],office=char[])\g

Query sent to backend is "create emp (name=char[], office=char[])"
CREATE
Go 
* append emp ( name="sidik", office="D-256")\g`

Query sent to backend is "append emp ( name="sidik", office="D-256")"
APPEND
Go 
* append emp (name="sudheer", office="D-255")\g

Query sent to backend is "append emp (name="sudheer", office="D-255")"
APPEND
Go 
* retrieve (emp.all)\g

Query sent to backend is "retrieve (emp.all)"
-----------------------------
| name        | office      |
-----------------------------
| sidik       | D-256       |
-----------------------------
| sudheer     | D-255       |
-----------------------------

Go 
* addattr (phone=char[]) to emp\g

Query sent to backend is "addattr (phone=char[]) to emp"
ADD
Go 
* 
retrieve (emp.all) \g

Query sent to backend is "retrieve (emp.all) "
-------------------------------------------
| name        | office      | phone       |
-------------------------------------------
| sidik       | D-256       | (null)      |
-------------------------------------------
| sudheer     | D-255       | (null)      |
-------------------------------------------

Go 
* retrieve  (emp.name) where emp.office="D-256" \g

Query sent to backend is "retrieve  (emp.name) where emp.office="D-256" "
WARN:May 27 08:42:14:OperatorDef: no operator =

Go 
* addattr (salary=int4) to emp \g

Query sent to backend is "addattr (salary=int4) to emp "
ADD
Go 
* replace emp (salary=200) \g

Query sent to backend is "replace emp (salary=200) "
REPLACE
Go 
* retrieve (emp.all)\g

Query sent to backend is "retrieve (emp.all)"
---------------------------------------------------------
| name        | office      | phone       | salary      |
---------------------------------------------------------
| sidik       | D-256       | (null)      | 200         |
---------------------------------------------------------
| sudheer     | D-255       | (null)      | 200         |
---------------------------------------------------------

Go 
* replace emp (name="ludhi") where emp.salary=200 \g

Query sent to backend is "replace emp (name="ludhi") where emp.salary=200 "
REPLACE
Go 
* retrieve (emp.all)\g

Query sent to backend is "retrieve (emp.all)"
---------------------------------------------------------
| name        | office      | phone       | salary      |
---------------------------------------------------------
| ludhi       | D-256       | (null)      | 200         |
---------------------------------------------------------
| ludhi       | D-255       | (null)      | 200         |
---------------------------------------------------------

Go 
* replace emp (salary=emp.salary*36) where emp.name="ludhi" \g

Query sent to backend is "replace emp (salary=emp.salary*36) where emp.name="ludhi" "
WARN:May 27 08:56:30:OperatorDef: no operator =

Go 
* \q
I live to serve you.
Ra% exit
Ra% 
script done on Wed May 27 08:56:40 1992

---

From: <[email-masked]>
Date: Wed, 27 May 92 08:26:54 PDT

In message <[email-masked]> you write:

>  [ ... ]

use type char16 (sixteen-byte fixed-length char string) or text
(variable-length char string, up to 8Kbytes) rather than the
char[] type.  no equality operator is defined between arrays
and strings.
					mike olson
					project sequoia 2000
					uc berkeley
					[email-masked]