Thread: compilation error

compilation error

From
Jignesh Shah
Date:
Hi, could any one please tell me how to get rid of below compilation error?
 
# gcc -fpic -c masanip-test-trigger.c
test-trigger.c:1:22: error: postgres.h: No such file or directory
test-trigger.c:2:77: error: executor/spi.h: No such file or directory
test-trigger.c:3:55: error: commands/trigger.h: No such file or directory
 
Thanks,
Jignesh

Re: compilation error

From
Devrim GÜNDÜZ
Date:
On Tue, 2009-08-25 at 13:46 +0530, Jignesh Shah wrote:
>
> # gcc -fpic -c masanip-test-trigger.c
> test-trigger.c:1:22: error: postgres.h: No such file or directory
> test-trigger.c:2:77: error: executor/spi.h: No such file or directory
> test-trigger.c:3:55: error: commands/trigger.h: No such file or
> directory

Install PostgreSQL development headers.
--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                   http://www.gunduz.org

Attachment

Re: compilation error

From
Jignesh Shah
Date:
Sorry but I dont know what is PostgreSQL development headers. Could you point me some links.
 
Thanks a lot.


2009/8/25 Devrim GÜNDÜZ <devrim@gunduz.org>
On Tue, 2009-08-25 at 13:46 +0530, Jignesh Shah wrote:
>
> # gcc -fpic -c masanip-test-trigger.c
> test-trigger.c:1:22: error: postgres.h: No such file or directory
> test-trigger.c:2:77: error: executor/spi.h: No such file or directory
> test-trigger.c:3:55: error: commands/trigger.h: No such file or
> directory

Install PostgreSQL development headers.
--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                  http://www.gunduz.org

Re: compilation error

From
Devrim GÜNDÜZ
Date:
On Tue, 2009-08-25 at 14:47 +0530, Jignesh Shah wrote:
>
>
> Sorry but I dont know what is PostgreSQL development headers

Which platform are you on? On Linux, you will need to install
postgresql-devel (Red Hat/CentOS/Fedora) or postgresql-server-dev-8.3
(on Ubuntu/Debian)(8.3 may change, of course). I don't know how to do it
on Windows or other platforms.
--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                   http://www.gunduz.org

Attachment

Re: compilation error

From
Jignesh Shah
Date:
Solaris.

2009/8/25 Devrim GÜNDÜZ <devrim@gunduz.org>
On Tue, 2009-08-25 at 14:47 +0530, Jignesh Shah wrote:
>
>
> Sorry but I dont know what is PostgreSQL development headers

Which platform are you on? On Linux, you will need to install
postgresql-devel (Red Hat/CentOS/Fedora) or postgresql-server-dev-8.3
(on Ubuntu/Debian)(8.3 may change, of course). I don't know how to do it
on Windows or other platforms.
--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                  http://www.gunduz.org

Re: compilation error

From
Lennin Caro
Date:
aptitude search postgresql-server-dev-8.3


Subject: Re: [NOVICE] compilation error
To: "Devrim GÜNDÜZ" <devrim@gunduz.org>
Cc: "postgresql novice" <pgsql-novice@postgresql.org>
Date: Tuesday, August 25, 2009, 9:17 AM

Sorry but I dont know what is PostgreSQL development headers. Could you point me some links.
 
Thanks a lot.


2009/8/25 Devrim GÜNDÜZ <devrim@gunduz.org>
On Tue, 2009-08-25 at 13:46 +0530, Jignesh Shah wrote:
>
> # gcc -fpic -c masanip-test-trigger.c
> test-trigger.c:1:22: error: postgres.h: No such file or directory
> test-trigger.c:2:77: error: executor/spi.h: No such file or directory
> test-trigger.c:3:55: error: commands/trigger.h: No such file or
> directory

Install PostgreSQL development headers.
--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                  http://www.gunduz.org




Re: compilation error

From
Jignesh Shah
Date:
Lennin, I could see language C installed in database then also I will need to install postgresql-server-dev-8.3?
 
mydb=> SELECT * FROM pg_language;
 lanname  | lanowner | lanispl | lanpltrusted | lanplcallfoid |
lanvalidator | lanacl
----------+----------+---------+--------------+---------------+--------------+--------
 internal |       10 | f       | f            |             0 |         2246 |
 c        |       10 | f       | f            |             0 |         2247 |
 sql      |       10 | f       | t            |             0 |         2248 |
 plperl   |    16386 | t       | t            |         19193 |        19194 |
Do I need to compile C trigger from the PostgrSQL server or from the my database connection? I mean I do ssh to my unix server where I have PostgreSQL configured. From here I should compile? OR should I compile code from below mydb database connection?
 
mydb=#

Thanks,
Jignesh
2009/8/25 Lennin Caro <lennin.caro@yahoo.com>
aptitude search postgresql-server-dev-8.3


Subject: Re: [NOVICE] compilation error
To: "Devrim GÜNDÜZ" <devrim@gunduz.org>
Cc: "postgresql novice" <pgsql-novice@postgresql.org>
Date: Tuesday, August 25, 2009, 9:17 AM


Sorry but I dont know what is PostgreSQL development headers. Could you point me some links.
 
Thanks a lot.


2009/8/25 Devrim GÜNDÜZ <devrim@gunduz.org>
On Tue, 2009-08-25 at 13:46 +0530, Jignesh Shah wrote:
>
> # gcc -fpic -c masanip-test-trigger.c
> test-trigger.c:1:22: error: postgres.h: No such file or directory
> test-trigger.c:2:77: error: executor/spi.h: No such file or directory
> test-trigger.c:3:55: error: commands/trigger.h: No such file or
> directory

Install PostgreSQL development headers.
--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                  http://www.gunduz.org





Re: compilation error

From
Lennin Caro
Date:
Subject: Re: [NOVICE] compilation error
To: "Lennin Caro" <lennin.caro@yahoo.com>
Cc: "Devrim GÜNDÜZ" <devrim@gunduz.org>, "postgresql novice" <pgsql-novice@postgresql.org>
Date: Wednesday, August 26, 2009, 11:27 AM

Lennin, I could see language C installed in database then also I will need to install postgresql-server-dev-8.3?
 
mydb=> SELECT * FROM pg_language;
 lanname  | lanowner | lanispl | lanpltrusted | lanplcallfoid |
lanvalidator | lanacl
----------+----------+---------+--------------+---------------+--------------+--------
 internal |       10 | f       | f            |             0 |         2246 |
 c        |       10 | f       | f            |             0 |         2247 |
 sql      |       10 | f       | t            |             0 |         2248 |
 plperl   |    16386 | t       | t            |         19193 |        19194 |
Do I need to compile C trigger from the PostgrSQL server or from the my database connection? I mean I do ssh to my unix server where I have PostgreSQL configured. From here I should compile? OR should I compile code from below mydb database connection?
 
mydb=#

Thanks,
Jignesh
2009/8/25 Lennin Caro <lennin.caro@yahoo.com>


aptitude search postgresql-server-dev-8.3


Subject: Re: [NOVICE] compilation error
To: "Devrim GÜNDÜZ" <devrim@gunduz.org>
Cc: "postgresql novice" <pgsql-novice@postgresql.org>
Date: Tuesday, August 25, 2009, 9:17 AM


Sorry but I dont know what is PostgreSQL development headers. Could you point me some links.
 
Thanks a lot.


2009/8/25 Devrim GÜNDÜZ <devrim@gunduz.org>
On Tue, 2009-08-25 at 13:46 +0530, Jignesh Shah wrote:
>
> # gcc -fpic -c masanip-test-trigger.c
> test-trigger.c:1:22: error: postgres.h: No such file or directory
> test-trigger.c:2:77: error: executor/spi.h: No such file or directory
> test-trigger.c:3:55: error: commands/trigger.h: No such file or
> directory

Install PostgreSQL development headers.
--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                  http://www.gunduz.org





IMHO If you include header postgresql in your c code then you have to install postgresql-dev

Correct me if i are wrong