Обсуждение: can anybody help me please

Поиск
Список
Период
Сортировка

can anybody help me please

От
rifki
Дата:
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
mentionedin 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
onlinux 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
mewhere 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

Re: can anybody help me please

От
Tom Lane
Дата:
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

Re: can anybody help me please

От
Dima Tkach
Дата:
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:

>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
typementioned 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.2on 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
mewhere 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
>
>



Re: can anybody help me please

От
Richard Huxton
Дата:
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