Subject: no operator > for types float8 and int4

From: Stuart Pook <[email-masked]>
Date: Mon, 27 Apr 92 16:59:06 +0200

I have just built and installed postgres v3r1 on my Sun Sparc running
SunOS 4.1.2.  The build had one problem in that it tried to run
"/usr/local/src/postgres/bin/initdb" which does not exist:

	Compiling demo files...
	cc   -I../src/lib/H -c circle.c
	cc   -I../src/lib/H -c boxarea.c
	cc   -I../src/lib/H -c overpaid.c
	producing the setup script set-up-1.pq
	Creating video demo objects...
	producing the setup script set-up-1.pq
	done

	Initializing template database...
	install.sh: /usr/local/src/postgres/bin/initdb: not found

	Cleaning up...
	Installation complete.
	done

When I ran "/usr/postgres/bin/createdb postgres" I got the warnings
"InitStdio: !ValidPgVersion" & "Did you run initdb yet??" and so I ran
/usr/postgres/bin/initdb by hand.

However when I create a database added "foo" and run through the examples
in "The POSTGRES User Manual" I get lots of "no operator" error messages,
some of which I have listed at the end.  Does this have anything to do with
the bug "Some builtin functions cannot be called due to argument type mismatch"
as listed in postgres-v3r1.bugs?  If so could someone please indicate how
to apply the workaround?

Thanks for any help
Stuart Pook ([email-masked])

Query sent to backend is
	"retrieve (result=EMP.salary/EMP.age) where EMP.name="Bill" "
NOTICE:Apr 27 16:59:08:there is no operator / for types float8 and int4 
NOTICE:Apr 27 16:59:08:You will either have to retype this query using an
NOTICE:Apr 27 16:59:08:explicit cast, or you will have to define the operator
WARN:Apr 27 16:59:08:/ for float8 and int4 using DEFINE OPERATOR

Query sent to backend is
	"retrieve into temp (EMP.name) where EMP.age<35 and EMP.salary>1000 "
NOTICE:Apr 27 16:48:41:there is no operator > for types float8 and int4
NOTICE:Apr 27 16:48:41:You will either have to retype this query using an
NOTICE:Apr 27 16:48:41:explicit cast, or you will have to define the operator
WARN:Apr 27 16:48:41:> for float8 and int4 using DEFINE OPERATOR

Query sent to backend is
	"retrieve (E1.name, E2.name)
	from E1 in EMP, E2 in EMP
	where E1.age=E2.age
	and E1.name != E2.name "
NOTICE:Apr 27 16:14:11:there is no operator != for types _char and _char
NOTICE:Apr 27 16:14:11:You will either have to retype this query using an
NOTICE:Apr 27 16:14:11:explicit cast, or you will have to define the operator
WARN:Apr 27 16:14:11:!= for _char and _char using DEFINE OPERATOR

---

From: postarch (Postgres Mailing Archive)
Date: Mon, 27 Apr 92 15:21:00 PDT

you write:
> the bug "Some builtin functions cannot be called due to argument type mismatc
 +h"
> as listed in postgres-v3r1.bugs?  If so could someone please indicate how

First, initdb should be in $POSTGRESHOME/bin, it seems like you somehow
fooled the initialization process.  If it currently is not you can find
the script in $POSTGRESHOME/src/scripts (I guess you found it).

Second, all of those WARN/NOTICE messages are due to problems in the new
user's guide, they are not bugs in the system.  We are overhauling it to
weed out the errors.

1.	EMP.salary is a floating point number according to the schema
	definition given in the manual.  If you make it an int4 things
	will work as expected.

2.	Array implementation causes a template type to be created for
	each kind of array defined.  Unfortunately, operators for all
	of these template types were never defined.  A rule of thumb
	to apply is only use individual array elements in operator
	clauses.

Jeff Meredith
[email-masked]