Please apply the following patch to fix problems with the AIX port
and the fmgr redesign. It makes the homebrewn dl*() functions for more recent Versions of AIX obsolete by using the system dl*() functions instead. It also fixes the expected file for the horology regression test. Please regenerate configure from configure.in, I don't have the environment/time. Andreas
This commit is contained in:
parent
72ad5fe15c
commit
469ebeefd6
@ -716,7 +716,7 @@ fcntl(0, F_SETLK, &lck);],
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid])
|
AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask sysconf waitpid dlopen])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
|
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
|
||||||
[AC_TRY_LINK(
|
[AC_TRY_LINK(
|
||||||
|
@ -42,9 +42,14 @@ if [ "`basename $OBJNAME`" != "`basename $OBJNAME .o`" ]; then
|
|||||||
fi
|
fi
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
echo '#!'
|
echo '#!'
|
||||||
|
else
|
||||||
|
if [ "$2" = "." ]; then
|
||||||
|
# for the base executable (AIX 4.2 and up)
|
||||||
|
echo '#! .'
|
||||||
else
|
else
|
||||||
echo '#!' $2/$OBJNAME
|
echo '#!' $2/$OBJNAME
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
$NM -Bg $1 | \
|
$NM -Bg $1 | \
|
||||||
egrep ' [TDB] ' | \
|
egrep ' [TDB] ' | \
|
||||||
sed -e 's/.* //' | \
|
sed -e 's/.* //' | \
|
||||||
|
@ -14,6 +14,13 @@
|
|||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
#include "dynloader.h"
|
#include "dynloader.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_DLOPEN
|
||||||
|
|
||||||
|
/*
|
||||||
|
* AIX 4.3 and up has dlopen() and friends in -ldl.
|
||||||
|
* A la long, the homebrewn dl*() functions below should be obsolete.
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We simulate dlopen() et al. through a call to load. Because AIX has
|
* We simulate dlopen() et al. through a call to load. Because AIX has
|
||||||
* no call to find an exported symbol we read the loader section of the
|
* no call to find an exported symbol we read the loader section of the
|
||||||
@ -601,3 +608,5 @@ findMain(void)
|
|||||||
free(buf);
|
free(buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_DLOPEN */
|
||||||
|
@ -1,13 +1,19 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: aix.h,v 1.2 1998/09/01 04:30:51 momjian Exp $
|
* $Id: aix.h,v 1.3 2000/09/29 22:00:43 momjian Exp $
|
||||||
*
|
*
|
||||||
* @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
|
* @(#)dlfcn.h 1.4 revision of 95/04/25 09:36:52
|
||||||
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
|
* This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
|
||||||
* 30159 Hannover, Germany
|
* 30159 Hannover, Germany
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __dlfcn_h__
|
#ifndef PORT_PROTOS_H
|
||||||
#define __dlfcn_h__
|
#define PORT_PROTOS_H
|
||||||
|
|
||||||
|
#ifdef HAVE_DLOPEN
|
||||||
|
|
||||||
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
#else /* HAVE_DLOPEN */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
@ -48,9 +54,14 @@ extern "C"
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define pg_dlopen(f) dlopen(filename, RTLD_LAZY)
|
#endif /* HAVE_DLOPEN */
|
||||||
#define pg_dlsym(h,f) dlsym(h, f)
|
|
||||||
#define pg_dlclose(h) dlclose(h)
|
|
||||||
#define pg_dlerror() dlerror()
|
|
||||||
|
|
||||||
#endif /* __dlfcn_h__ */
|
#include "fmgr.h"
|
||||||
|
#include "utils/dynamic_loader.h"
|
||||||
|
|
||||||
|
#define pg_dlopen(f) dlopen(f, RTLD_LAZY)
|
||||||
|
#define pg_dlsym dlsym
|
||||||
|
#define pg_dlclose dlclose
|
||||||
|
#define pg_dlerror dlerror
|
||||||
|
|
||||||
|
#endif /* PORT_PROTOS_H */
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* or in config.h afterwards. Of course, if you edit config.h, then your
|
* or in config.h afterwards. Of course, if you edit config.h, then your
|
||||||
* changes will be overwritten the next time you run configure.
|
* changes will be overwritten the next time you run configure.
|
||||||
*
|
*
|
||||||
* $Id: config.h.in,v 1.136 2000/09/29 13:53:32 petere Exp $
|
* $Id: config.h.in,v 1.137 2000/09/29 22:00:45 momjian Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CONFIG_H
|
#ifndef CONFIG_H
|
||||||
@ -581,6 +581,9 @@ extern void srandom(unsigned int seed);
|
|||||||
/* Define if C++ compiler accepts "#include <string>" */
|
/* Define if C++ compiler accepts "#include <string>" */
|
||||||
#undef HAVE_CXX_STRING_HEADER
|
#undef HAVE_CXX_STRING_HEADER
|
||||||
|
|
||||||
|
/* Define if a system lib (-ldl) has dlopen() (needed for AIX) */
|
||||||
|
#undef HAVE_DLOPEN
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*------------------------------------------------------------------------
|
*------------------------------------------------------------------------
|
||||||
|
@ -22,4 +22,4 @@ $(POSTGRES_IMP):
|
|||||||
|
|
||||||
%$(DLSUFFIX): %.o %$(EXPSUFF)
|
%$(DLSUFFIX): %.o %$(EXPSUFF)
|
||||||
@echo Making share library $@ from $*.o, $*$(EXPSUFF), and installed postgres.imp
|
@echo Making share library $@ from $*.o, $*$(EXPSUFF), and installed postgres.imp
|
||||||
$(LD) -H512 -bM:SRE -bI:$(libdir)/$(POSTGRES_IMP) -bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(CFLAGS_SL)
|
$(CC) -Wl,-H512 -Wl,-bM:SRE -Wl,-bI:$(libdir)/$(POSTGRES_IMP) -Wl,-bE:$*$(EXPSUFF) -o $@ $*.o $(LDFLAGS) $(CFLAGS_SL)
|
||||||
|
@ -2,6 +2,48 @@
|
|||||||
-- HOROLOGY
|
-- HOROLOGY
|
||||||
--
|
--
|
||||||
--
|
--
|
||||||
|
-- date, time arithmetic
|
||||||
|
--
|
||||||
|
SELECT date '1981-02-03' + time '04:05:06' AS "Date + Time";
|
||||||
|
Date + Time
|
||||||
|
------------------------------
|
||||||
|
Tue Feb 03 04:05:06 1981 PST
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT date '1991-02-03' + time with time zone '04:05:06 PST' AS "Date + Time PST";
|
||||||
|
Date + Time PST
|
||||||
|
------------------------------
|
||||||
|
Sun Feb 03 04:05:06 1991 PST
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT date '2001-02-03' + time with time zone '04:05:06 UTC' AS "Date + Time UTC";
|
||||||
|
Date + Time UTC
|
||||||
|
------------------------------
|
||||||
|
Fri Feb 02 20:05:06 2001 PST
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT date '1991-02-03' + interval '2 years' AS "Add Two Years";
|
||||||
|
Add Two Years
|
||||||
|
------------------------------
|
||||||
|
Wed Feb 03 00:00:00 1993 PST
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT date '2001-12-13' - interval '2 years' AS "Subtract Two Years";
|
||||||
|
Subtract Two Years
|
||||||
|
------------------------------
|
||||||
|
Mon Dec 13 00:00:00 1999 PST
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT date '1991-02-03' - time '04:05:06' AS "Subtract Time";
|
||||||
|
Subtract Time
|
||||||
|
------------------------------
|
||||||
|
Sat Feb 02 19:54:54 1991 PST
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT date '1991-02-03' - time with time zone '04:05:06 UTC' AS "Subtract Time UTC";
|
||||||
|
ERROR: Unable to identify an operator '-' for types 'date' and 'timetz'
|
||||||
|
You will have to retype this query using an explicit cast
|
||||||
|
--
|
||||||
-- timestamp, interval arithmetic
|
-- timestamp, interval arithmetic
|
||||||
--
|
--
|
||||||
SELECT timestamp '1996-03-01' - interval '1 second' AS "Feb 29";
|
SELECT timestamp '1996-03-01' - interval '1 second' AS "Feb 29";
|
||||||
|
Loading…
Reference in New Issue
Block a user