Subject: Problem with type definition

From: [email-masked] (Ke Qiu)
Date: Tue, 4 Aug 92 21:04:10 -0700

Dear postgres developer:

I followed the process on page 14 of "Postgres User Manual" to define
the circle data type. I got the following error message when I tried
to register it in database.

[hardy:~postgres/circle]monitor qiudemo
monitor> \i
iofundef.pq

Query sent to backend is "define function circle_in (language="c", returntype=cirlce) arg is (char16) 
as "/users/maxine2/qiu/postgres/circle/circle.o"  "
NOTICE:Aug  4 23:35:13:ProcedureDefine: return type 'cirlce' not yet defined

DEFINE
Query sent to backend is "define function circle_out (language="c", returntype=c
har16) arg is (circle) as "/users/maxine2/qiu/postgres/circle/circle.o"  "
WARN:Aug  4 23:35:14:ProcedureDefine: arg type 'circle' is not defined

monitor> define type cicle
monitor> (internallength=24,
monitor> input=circle_in, output=circle_out) \g

Query sent to backend is "define type cicle(internallength=24,input=circle_in, o
utput=circle_out) "
WARN:Aug  4 23:36:17:TypeDefine: procedure circle_out nonexistent

As documented in the manual, postgres gave a notice for circle_in.
However it gave a warning for circle_out, which is apparebtly wrong
because type definition failed after that.

By the way, could you tell me the exact format to compile the C functions on
Sun sparc/IPC in order that they can be used by postgres for dynamic link?
Or you can send me the scenario that compile overpaid.o, boxarea.o under
video dir. A few days ago, I asked the same question. But the proposed
solution didn't work.

(I found a footnote that Ultrix compiler requires -G0 option, may be 
I missed something for Sun sparc station)

I enclose my make file below:

TREE=	/usr/users/postgres/postsparc
OD=	/usr/users/postgres/postsparc/obj.sparc
SD=	/usr/users/postgres/postsparc/src
PORTNAME=	sparc

PORTDIR=	port/sparc
PORTLDFLAGS=-N
GCFLAGS=	-O -DNO_ASSERT_CHECKING
LDFLAGS=	$(GCFLAGS)
CFLAGS=		$(GCFLAGS) \
		-I$(SD)/lib/H \
		-I$(SD)/lib/H/obsolete \
		-I$(OD)/lib/H \
		-I$(SD)/$(PORTDIR) 
#DIRS=		./dirs.mk
#DEMOCCOPTS=-G 0
#

image.o:
	$(CC) $(CFLAGS) -c image.c

Thanks a lot.

Ke Qiu
GAEA Project
Computer Science Dept.
WPI

---

From: postarch (Postgres Mailing Archive)
Date: Mon, 10 Aug 92 09:57:16 PDT

you write:

> Query sent to backend is "define function circle_in (language="c", returntype
 +=cirlce) arg is (char16) 
> Query sent to backend is "define function circle_out (language="c", returntyp
 +e=c
> WARN:Aug  4 23:35:14:ProcedureDefine: arg type 'circle' is not defined

This is *very* strange.  We have this very same example in the demo.
Have you ever successfully run the demo?

Jeff Meredith
[email-masked]