Обсуждение: Install postgreSql 8.0 beta1 without user interaction

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

Install postgreSql 8.0 beta1 without user interaction

От
"M S"
Дата:
Hackers

Can we install PostgreSQL beta 8.0 version on windows without user
interaction. By using default userids and password.

Needs to be done on a remote computer on a network.

Thank You

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee�
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


palloc() under cygwin?

От
Helmut Hänsel
Дата:
Hello,

I was trying to add a c-function to postgreSQL, running under cygwin.
I have installed and compiled the 8.0.0cvs from scratch, postmaster is
working fine :-)

#define _XOPEN_SOURCE
#include "postgres.h"
#include "fmgr.h"
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>

PG_FUNCTION_INFO_V1(pg_crypt);
Datum
pg_crypt(PG_FUNCTION_ARGS)
{   int32 new_varchar_size=13+VARHDRSZ;
    VarChar     *new_t = (VarChar *) palloc(new_varchar_size);
/* ... */
    PG_RETURN_VARCHAR_P(new_t);
}

compiling is successful, but linking leads to

pg_func.o(.text+0x4f):pg_func.c: undefined reference to
`__imp__CurrentMemoryContext'

If I try using pgport_palloc() instead of palloc() ( in my despair;-)
the source is compiled and linked without error but as soon as the pg_crypt
is executed from within a psql session, the postmaster crashes with signal
11.

Any Help?
Would be really great !!!

Helmut

P.S.: The function is tested and works fine under a LINUX environment


Re: palloc() under cygwin?

От
Reini Urban
Дата:
Helmut Hänsel schrieb:
> I was trying to add a c-function to postgreSQL, running under cygwin.
> I have installed and compiled the 8.0.0cvs from scratch, postmaster is
> working fine :-)
>
> #define _XOPEN_SOURCE
> #include "postgres.h"
> #include "fmgr.h"
> #include <unistd.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <sys/types.h>
> #include <sys/wait.h>
>
> PG_FUNCTION_INFO_V1(pg_crypt);
> Datum
> pg_crypt(PG_FUNCTION_ARGS)
> {   int32 new_varchar_size=13+VARHDRSZ;
>     VarChar     *new_t = (VarChar *) palloc(new_varchar_size);
> /* ... */
>     PG_RETURN_VARCHAR_P(new_t);
> }
>
> compiling is successful, but linking leads to
>
> pg_func.o(.text+0x4f):pg_func.c: undefined reference to
> `__imp__CurrentMemoryContext'
>
> If I try using pgport_palloc() instead of palloc() ( in my despair;-)
> the source is compiled and linked without error but as soon as the pg_crypt
> is executed from within a psql session, the postmaster crashes with signal
> 11.
>
> Any Help?
> Would be really great !!!
>
> Helmut
>
> P.S.: The function is tested and works fine under a LINUX environment

looks like another IPC problem, similar to the plperl problem.
increase shmem buffer size?

--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

Re: palloc() under cygwin?

От
Helmut Hänsel
Дата:
> Helmut Hänsel schrieb:
> > I was trying to add a c-function to postgreSQL, running under cygwin.
> > I have installed and compiled the 8.0.0cvs from scratch, postmaster is
> > working fine :-)
> >
> > #define _XOPEN_SOURCE
> > #include "postgres.h"
> > #include "fmgr.h"
> > #include <unistd.h>
> > #include <fcntl.h>
> > #include <stdio.h>
> > #include <sys/types.h>
> > #include <sys/wait.h>
> >
> > PG_FUNCTION_INFO_V1(pg_crypt);
> > Datum
> > pg_crypt(PG_FUNCTION_ARGS)
> > {   int32 new_varchar_size=13+VARHDRSZ;
> >     VarChar     *new_t = (VarChar *) palloc(new_varchar_size);
> > /* ... */
> >     PG_RETURN_VARCHAR_P(new_t);
> > }
> >
> > compiling is successful, but linking leads to
> >
> > pg_func.o(.text+0x4f):pg_func.c: undefined reference to
> > `__imp__CurrentMemoryContext'
> >
> > If I try using pgport_palloc() instead of palloc() ( in my despair;-)
> > the source is compiled and linked without error but as soon as the
pg_crypt
> > is executed from within a psql session, the postmaster crashes with
signal
> > 11.
> >
> > Any Help?
> > Would be really great !!!
> >
> > Helmut
> >
> > P.S.: The function is tested and works fine under a LINUX environment
>
> looks like another IPC problem, similar to the plperl problem.
> increase shmem buffer size?
>
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/

I had this idea already, but increaseing the momory size didn't help:

I still wonder whether I should use palloc() or pgport_palloc() and what I
could do in order to get the palloc() version properly linked. In my eyes
dirmod.c should be involved somehow as that is the place where palloc() is
redefined.

BTW, the same happens under MinGW.


Re: palloc() under cygwin?

От
Helmut Hänsel
Дата:
Solved!

calling the linker with -lpostgres removes all errors.
Everything works fine now :-))

thx a lot for your help,
HH


----- Original Message -----
From: "Reini Urban" <rurban@x-ray.at>
To: "Helmut Hänsel" <Helmut.Haensel@uni-bayreuth.de>
Cc: <pgsql-cygwin@postgresql.org>
Sent: Dienstag, 19. Oktober 2004 22:01
Subject: Re: [CYGWIN] palloc() under cygwin?


> Helmut Hänsel schrieb:
> > I was trying to add a c-function to postgreSQL, running under cygwin.
> > I have installed and compiled the 8.0.0cvs from scratch, postmaster is
> > working fine :-)
> >
> > #define _XOPEN_SOURCE
> > #include "postgres.h"
> > #include "fmgr.h"
> > #include <unistd.h>
> > #include <fcntl.h>
> > #include <stdio.h>
> > #include <sys/types.h>
> > #include <sys/wait.h>
> >
> > PG_FUNCTION_INFO_V1(pg_crypt);
> > Datum
> > pg_crypt(PG_FUNCTION_ARGS)
> > {   int32 new_varchar_size=13+VARHDRSZ;
> >     VarChar     *new_t = (VarChar *) palloc(new_varchar_size);
> > /* ... */
> >     PG_RETURN_VARCHAR_P(new_t);
> > }
> >
> > compiling is successful, but linking leads to
> >
> > pg_func.o(.text+0x4f):pg_func.c: undefined reference to
> > `__imp__CurrentMemoryContext'
> >
> > If I try using pgport_palloc() instead of palloc() ( in my despair;-)
> > the source is compiled and linked without error but as soon as the
pg_crypt
> > is executed from within a psql session, the postmaster crashes with
signal
> > 11.
> >
> > Any Help?
> > Would be really great !!!
> >
> > Helmut
> >
> > P.S.: The function is tested and works fine under a LINUX environment
>
> looks like another IPC problem, similar to the plperl problem.
> increase shmem buffer size?
>
> --
> Reini Urban
> http://xarch.tu-graz.ac.at/home/rurban/