... - Mailing list pgsql-sql

From John Palmer
Subject ...
Date
Msg-id 3.0.5.32.19980909170331.007a5100@roadrunner.acucobol.co.uk
Whole thread Raw
Responses RE:  (Craig Orsinger <orsingerc@epg-gw1.lewis.army.mil>)
List pgsql-sql

Hi All,

I am a FreeBSD 2.2.6  & LINUX (REDHAT 5.1) user. I have successfuly installed
postgresql-6.3.2 in my FreeBSD system.Then I wanted to create some tables and
use REFERENCES/FOREIGN KEY's. I saw some details about them in contrib/spi
but
I cannot compile and create in FreeBSD although LINUX is OK. I have included
screen outputs for both systems.

If anyone can give me some ideas how to compile them I will be very
appreciated.




                                YOURS DESPERATELY

                                John Palmer


# ******************************************************* #
#               Linux (Redhat 5.1) Section                #
# ******************************************************* #

[root@speedy src]# cd /home/ftp/incoming/postgresql-6.3.2/contrib/
[root@speedy spi]# make
gcc -I../../src/include -I../../src/backend     -Wall -Wmissing-prototypes
-fpic -I../../src/include   -c refint.c -o refint.o
gcc -shared -o refint.so refint.o
rm -f refint.sql; \
C=`pwd`; \
sed -e "s:_OBJWD_:/usr/local/pgsql/lib/contrib:g" \
    -e "s:_DLSUFFIX_:.so:g" < refint.source > refint.sql
gcc -I../../src/include -I../../src/backend     -Wall -Wmissing-prototypes
-fpic -I../../src/include   -c timetravel.c -o timetravel.o
gcc -shared -o timetravel.so timetravel.o
rm -f timetravel.sql; \
C=`pwd`; \
sed -e "s:_OBJWD_:/usr/local/pgsql/lib/contrib:g" \
    -e "s:_DLSUFFIX_:.so:g" < timetravel.source > timetravel.sql
gcc -I../../src/include -I../../src/backend     -Wall -Wmissing-prototypes
-fpic -I../../src/include   -c autoinc.c -o autoinc.o
gcc -shared -o autoinc.so autoinc.o
rm -f autoinc.sql; \
C=`pwd`; \
sed -e "s:_OBJWD_:/usr/local/pgsql/lib/contrib:g" \
    -e "s:_DLSUFFIX_:.so:g" < autoinc.source > autoinc.sql
gcc -I../../src/include -I../../src/backend     -Wall -Wmissing-prototypes
-fpic -I../../src/include   -c insert_username.c -o insert_username.o
gcc -shared -o insert_username.so insert_username.o
rm -f insert_username.sql; \
C=`pwd`; \
sed -e "s:_OBJWD_:/usr/local/pgsql/lib/contrib:g" \
    -e "s:_DLSUFFIX_:.so:g" < insert_username.source > insert_username.sql
rm refint.o autoinc.o insert_username.o timetravel.o
[root@speedy spi]# ls -al
total 92
drwxr-xr-x   2 1005     wheel        1024 Sep  9 15:36 .
drwxr-xr-x  16 1005     wheel        1024 Mar 23 08:00 ..
-rw-r--r--   1 1005     wheel         745 Jan 17  1998 Makefile
-rw-r--r--   1 1005     wheel        5377 Oct 17  1997 README
-rw-r--r--   1 1005     wheel        2761 Feb 26  1998 autoinc.c
-rw-r--r--   1 1005     wheel         803 Oct  2  1997 autoinc.example
-rwxrwxr-x   1 root     root         5936 Sep  9 15:35 autoinc.so
-rw-r--r--   1 1005     wheel         117 Oct  2  1997 autoinc.source
-rw-rw-r--   1 root     root          131 Sep  9 15:35 autoinc.sql
-rw-r--r--   1 1005     wheel        2368 Feb 26  1998 insert_username.c
-rw-r--r--   1 1005     wheel         562 Oct 17  1997 insert_username.example
-rwxrwxr-x   1 root     root         5449 Sep  9 15:36 insert_username.so
-rw-r--r--   1 1005     wheel         141 Oct 17  1997 insert_username.source
-rw-rw-r--   1 root     root          155 Sep  9 15:36 insert_username.sql
-rw-r--r--   1 1005     wheel       15593 Feb 26  1998 refint.c
-rw-r--r--   1 1005     wheel        2110 Sep 12  1997 refint.example
-rwxrwxr-x   1 root     root        10938 Sep  9 15:35 refint.so
-rw-r--r--   1 1005     wheel         274 Sep 11  1997 refint.source
-rw-rw-r--   1 root     root          302 Sep  9 15:35 refint.sql
-rw-r--r--   1 1005     wheel       10694 Feb 26  1998 timetravel.c
-rw-r--r--   1 1005     wheel        2036 Oct  2  1997 timetravel.example
-rwxrwxr-x   1 root     root        10653 Sep  9 15:35 timetravel.so
-rw-r--r--   1 1005     wheel         278 Oct  2  1997 timetravel.source
-rw-rw-r--   1 root     root          306 Sep  9 15:35 timetravel.sql
[root@speedy spi]# cat timetravel.sql
DROP FUNCTION timetravel();
DROP FUNCTION set_timetravel(name, int4);

CREATE FUNCTION timetravel()
        RETURNS opaque
        AS '/usr/local/pgsql/lib/contrib/timetravel.so'
        LANGUAGE 'c';

CREATE FUNCTION set_timetravel(name, int4)
        RETURNS int4
        AS '/usr/local/pgsql/lib/contrib/timetravel.so'
        LANGUAGE 'c';
[root@speedy spi]#

# ******************************************************* #
#            End of Linux (Redhat 5.1) Section            #
# ******************************************************* #




# ******************************************************* #
#                  FreeBSD 2.2.6 Section                  #
# ******************************************************* #


checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for ieeefp.h... no
checking for fp_class.h... no
checking for netinet/in.h... yes
checking for string.h... yes
checking for strings.h... yes
checking for working const... yes
checking for uid_t in sys/types.h... yes
checking for inline... inline
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for int timezone... no
checking for gettimeofday args... 2 args
checking for union semun... yes
checking whether gcc needs -traditional... no
checking for 8-bit clean memcmp... yes
checking return type of signal handlers... void
checking for vprintf... yes
checking for tzset... yes
checking for vfork... yes
checking for memmove... yes
checking for sigsetjmp... yes
checking for kill... yes
checking for sysconf... yes
checking for fpclass... no
checking for fp_class... no
checking for fp_class_d... no
checking for class... no
checking for sigprocmask... yes
checking for waitpid... yes
checking for setsid... yes
checking for fcvt... no
checking for isinf... yes
checking for getrusage... yes
checking for srandom... yes
checking for gethostname... yes
checking for random... yes
checking for inet_aton... yes
checking for strerror... yes
checking for strdup... yes
checking for strtol... yes
checking for strtoul... yes
checking for strcasecmp... yes
checking for cbrt... yes
checking for rint... yes
updating cache ./config.cache
creating ./config.status
creating GNUmakefile
creating Makefile.global
creating backend/port/Makefile
creating bin/pg_version/Makefile
creating bin/psql/Makefile
creating bin/pg_dump/Makefile
creating backend/utils/Gen_fmgrtab.sh
creating interfaces/libpq/Makefile
creating interfaces/libpgtcl/Makefile
creating interfaces/ecpg/lib/Makefile
creating include/config.h
linking ./backend/port/tas/dummy.s to backend/port/tas.s
linking ./backend/port/dynloader/bsd.c to backend/port/dynloader.c
linking ./backend/port/dynloader/bsd.h to include/dynloader.h
linking ./include/port/bsd.h to include/os.h
linking ./makefiles/Makefile.bsd to Makefile.port
bash-2.01# cd ../contrib/
bash-2.01# cd spi/
bash-2.01# ls -al
total 53
drwxr-xr-x   2 pgsql  wheel    512 Mar 20 02:13 .
drwxr-xr-x  16 pgsql  wheel    512 Mar 23 08:00 ..
-rw-r--r--   1 pgsql  wheel    745 Jan 17  1998 Makefile
-rw-r--r--   1 pgsql  wheel   5377 Oct 17  1997 README
-rw-r--r--   1 pgsql  wheel   2761 Feb 26  1998 autoinc.c
-rw-r--r--   1 pgsql  wheel    803 Oct  2  1997 autoinc.example
-rw-r--r--   1 pgsql  wheel    117 Oct  2  1997 autoinc.source
-rw-r--r--   1 pgsql  wheel   2368 Feb 26  1998 insert_username.c
-rw-r--r--   1 pgsql  wheel    562 Oct 17  1997 insert_username.example
-rw-r--r--   1 pgsql  wheel    141 Oct 17  1997 insert_username.source
-rw-r--r--   1 pgsql  wheel  15593 Feb 26  1998 refint.c
-rw-r--r--   1 pgsql  wheel   2110 Sep 12  1997 refint.example
-rw-r--r--   1 pgsql  wheel    274 Sep 11  1997 refint.source
-rw-r--r--   1 pgsql  wheel  10694 Feb 26  1998 timetravel.c
-rw-r--r--   1 pgsql  wheel   2036 Oct  2  1997 timetravel.example
-rw-r--r--   1 pgsql  wheel    278 Oct  2  1997 timetravel.source
bash-2.01# make
"../../src/Makefile.global", line 118: Need an operator
"../../src/Makefile.global", line 122: Missing dependency operator
"../../src/Makefile.global", line 126: Need an operator
"../../src/Makefile.global", line 127: Missing dependency operator
"../../src/Makefile.global", line 131: Need an operator
"../../src/Makefile.global", line 132: Need an operator
"../../src/Makefile.global", line 133: Need an operator
"../../src/Makefile.global", line 203: Need an operator
"../../src/Makefile.global", line 204: Could not find
../../src/Makefile.custom
"../../src/Makefile.global", line 205: Need an operator
"../../src/Makefile.global", line 210: Missing dependency operator
"../../src/Makefile.global", line 212: Need an operator
"../../src/Makefile.global", line 241: Missing dependency operator
"../../src/Makefile.global", line 243: Need an operator
"../../src/Makefile.global", line 245: Missing dependency operator
"../../src/Makefile.global", line 247: Need an operator
"../../src/Makefile.global", line 249: Missing dependency operator
"../../src/Makefile.global", line 251: Need an operator
"../../src/Makefile.global", line 253: Need an operator
"../../src/Makefile.global", line 255: Need an operator
"../../src/Makefile.global", line 257: Need an operator
"../../src/Makefile.global", line 260: Need an operator
"Makefile", line 10: Need an operator
"Makefile", line 12: Need an operator
make: fatal errors encountered -- cannot continue
bash-2.01#

# ******************************************************* #
#              End of FreeBSD 2.2.6 Section               #
# ******************************************************* #


-





John Palmer                         Eurepean IS Manager
--------------------------------------------------------------
E-mail: jpalmer@acucobol.co.uk      Acucorp UK,
Phone : +44 (0)181 707 2060         9th Floor, 42 The Centre,
Fax   : +44 (0)181 707 2055         Highfield Road, Feltham,
Mobile: +44 (0)402 37775            Middlesex, TW13 4AU
WWW   : http://www.acucorp.com      United Kingdom
--------------------------------------------------------------


pgsql-sql by date:

Previous
From: Jim Jennis
Date:
Subject: Loading Array data from delimited ascii files
Next
From: Eric McKeown
Date:
Subject: Re: [SQL] Loading Array data from delimited ascii files