can anybody help me please

Started by rifkiover 22 years ago4 messagesgeneral
Jump to latest
#1rifki
rifki@comlabs.itb.ac.id

Hi, there,
i need a help in creating new data type in postgresql. I've read the manual, create type, i have try to create the type mentioned in the manual (chapter Extending SQL type). but to no avail.
At first it was my cygwin installation that doesn't support C as the language using createlang. But my postgresql 7.2.2 on linux Redhat 8, show the same behaviour. They only support plpgsql, pltcl, etc.

i also try to make a c program which only prints something like "Hello World", i include the postgresql.h file as header, i found out that the file isn't anywhere in my computer. My question: where can i get it? Can somebody just tell me where the resource is?

i really appreciate those gurus who would like to help newbie like me.

regards,
rifki
++++++++++++++++++++++++++
+   open mind, open heart, act !  +
++++++++++++++++++++++++++

-------------------------------------------------------------------------------------------
This message was sent using DeskNow Lite - Free mail & collaboration server
http://www.desknow.com

#2Dmitry Tkach
dmitry@openratings.com
In reply to: rifki (#1)
Re: can anybody help me please

First, you don't need to 'create lang' for C. It is predefined language,
you can just use it.
Second, you need to download postgres source (or get it from CVS) to
write postgres functions in C.
You can get it from here for example;
ftp://ftp.postgresql.org/pub/source/v7.3.3
or look at postgresql.org for instructions on getting the source from CVS:
http://www.postgresql.org/docs/7.3/static/cvs.html

When you get the source code, look into the contrib directory - there is
a whole lot of code there that you can use as examples of creating
postgres functions in C

I hope, it helps...

Dima

rifki wrote:

Show quoted text

Hi, there,
i need a help in creating new data type in postgresql. I've read the manual, create type, i have try to create the type mentioned in the manual (chapter Extending SQL type). but to no avail.
At first it was my cygwin installation that doesn't support C as the language using createlang. But my postgresql 7.2.2 on linux Redhat 8, show the same behaviour. They only support plpgsql, pltcl, etc.

i also try to make a c program which only prints something like "Hello World", i include the postgresql.h file as header, i found out that the file isn't anywhere in my computer. My question: where can i get it? Can somebody just tell me where the resource is?

i really appreciate those gurus who would like to help newbie like me.

regards,
rifki
++++++++++++++++++++++++++
+   open mind, open heart, act !  +
++++++++++++++++++++++++++

-------------------------------------------------------------------------------------------
This message was sent using DeskNow Lite - Free mail & collaboration server
http://www.desknow.com

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: rifki (#1)
Re: can anybody help me please

rifki <rifki@comlabs.itb.ac.id> writes:

i also try to make a c program which only prints something like "Hello
World", i include the postgresql.h file as header, i found out that
the file isn't anywhere in my computer.

It's postgres.h. If you still can't find it, maybe you didn't install
the server-side header files. In a build from source, you need to do
"make install-all-headers" as well as "make install" if you intend to
do server-side programming. Not sure how the RPMs handle this.

regards, tom lane

#4Richard Huxton
dev@archonet.com
In reply to: Tom Lane (#3)
Re: can anybody help me please

On Tuesday 22 July 2003 14:37, Tom Lane wrote:

rifki <rifki@comlabs.itb.ac.id> writes:

i also try to make a c program which only prints something like "Hello
World", i include the postgresql.h file as header, i found out that
the file isn't anywhere in my computer.

It's postgres.h. If you still can't find it, maybe you didn't install
the server-side header files. In a build from source, you need to do
"make install-all-headers" as well as "make install" if you intend to
do server-side programming. Not sure how the RPMs handle this.

All the header files are in the -devel package

--
Richard Huxton
Archonet Ltd