Hi,
I'm trying to start to program with the PostgreSQL's geometric primitive
types, and have started to write some code using them (PostgreSQL
version 7.1.3, installed from source). However when I
include the file utils/geo_decls.h I get an error starting that the type
PGFunction (found in a file included from geo_decls.h) cannot be found.

I've done a search of all the header files in my installation (and also
all the source files that I compiled), and cannot find the definition of
the PGFunction type. Does anyone have any idea of where I can find this
definition, or of why it might be missing.
-- 
Tony

---------------------------------
Dr. Tony Griffiths
Research Fellow
Information Management Group,
Department of Computer Science,
The University of Manchester,
Oxford Road,
Manchester M13 9PL, 
United Kingdom

Tel. +44 (0) 161 275 6139
Fax +44 (0) 161 275 6236
email tony.griffiths@cs.man.ac.uk
---------------------------------

Fri, 07 Jun 2002 11:11:30 +0100
Tony Griffiths <tony.griffiths@cs.man.ac.uk>
Missing types in C header files
Tony Griffiths writes:

> I've done a search of all the header files in my installation (and also
> all the source files that I compiled), and cannot find the definition of
> the PGFunction type. Does anyone have any idea of where I can find this
> definition, or of why it might be missing.

fmgr.h

-- 
Peter Eisentraut   peter_e@gmx.net


Sat, 8 Jun 2002 00:27:29 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: Missing types in C header files
Tony Griffiths wrote:
> 
> Hi,
> I'm trying to start to program with the PostgreSQL's geometric primitive
> types, and have started to write some code using them (PostgreSQL
> version 7.1.3, installed from source). However when I
> include the file utils/geo_decls.h I get an error starting that the type
> PGFunction (found in a file included from geo_decls.h) cannot be found.
> 
> I've done a search of all the header files in my installation (and also
> all the source files that I compiled), and cannot find the definition of
> the PGFunction type. Does anyone have any idea of where I can find this
> definition, or of why it might be missing.

Hmm. I'm not sure (having not integrated client-side handling of these
types using Postgres' own definition of the structures) but I think that
these definitions are not intended for you to use directly. There is a
set of include files intended for client-side programs, and perhaps this
data type needs to be mentioned there. Or perhaps we make no provision
for that (yet) and you are on your own. Perhaps someone else will speak
up on The Right Way To Do This?

                - Thomas

Fri, 07 Jun 2002 18:03:30 -0700
Thomas Lockhart <lockhart@fourpalms.org>
Re: Missing types in C header files
I've looked in fmgr.h and there is no definition of this type there - it
uses the type, but does not define it.

Peter Eisentraut wrote:
> 
> Tony Griffiths writes:
> 
> > I've done a search of all the header files in my installation (and also
> > all the source files that I compiled), and cannot find the definition of
> > the PGFunction type. Does anyone have any idea of where I can find this
> > definition, or of why it might be missing.
> 
> fmgr.h
> 
> --
> Peter Eisentraut   peter_e@gmx.net
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org

-- 
Tony

---------------------------------
Dr. Tony Griffiths
Research Fellow
Information Management Group,
Department of Computer Science,
The University of Manchester,
Oxford Road,
Manchester M13 9PL, 
United Kingdom

Tel. +44 (0) 161 275 6139
Fax +44 (0) 161 275 6236
email tony.griffiths@cs.man.ac.uk
---------------------------------

Sun, 09 Jun 2002 23:42:04 +0100
Tony Griffiths <tony.griffiths@cs.man.ac.uk>
Re: Missing types in C header files
I've found the mistake - as usual it's down to me! I didn't realise that 
I had to include postgres.h before including geo_decls.h  All now 
compiles ok.

Tony

Tony Griffiths wrote:

>I've looked in fmgr.h and there is no definition of this type there - it
>uses the type, but does not define it.
>
>Peter Eisentraut wrote:
>
>>Tony Griffiths writes:
>>
>>>I've done a search of all the header files in my installation (and also
>>>all the source files that I compiled), and cannot find the definition of
>>>the PGFunction type. Does anyone have any idea of where I can find this
>>>definition, or of why it might be missing.
>>>
>>fmgr.h
>>
>>--
>>Peter Eisentraut   peter_e@gmx.net
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 6: Have you searched our list archives?
>>
>>http://archives.postgresql.org
>>
>






I've found the mistake - as usual it's down to me! I didn't realise that
I had to include postgres.h before including geo_decls.h  All now compiles
ok.

Tony

Tony Griffiths wrote:

I've looked in fmgr.h and there is no definition of this type there - ituses the type, but does not define it.Peter Eisentraut wrote:

Tony Griffiths writes:

I've done a search of all the header files in my installation (and alsoall the source files that I compiled), and cannot find the definition ofthe PGFunction type. Does anyone have any idea of where I can find thisdefinition, or of why it might be missing.

fmgr.h--Peter Eisentraut   peter_e@gmx.net---------------------------(end of broadcast)---------------------------TIP 6: Have you searched our list archives?http://archives.postgresql.org
Mon, 10 Jun 2002 14:27:24 +0100
"Tony Griffiths(RA)" <griffitt@cs.man.ac.uk>
Re: Missing types in C header files
Tony Griffiths <tony.griffiths@cs.man.ac.uk> writes:
> I've looked in fmgr.h and there is no definition of this type there - it
> uses the type, but does not define it.

Eh?

	typedef Datum (*PGFunction) (FunctionCallInfo fcinfo);

Looks like a definition to me ...

			regards, tom lane

Mon, 10 Jun 2002 10:04:49 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Missing types in C header files 