Обсуждение: Need Help Installing Dblink…(Desperately…)

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

Need Help Installing Dblink…(Desperately…)

От
Jerry Levan
Дата:
I think I have somehow botched my installation of 9.1.1 on Mac OSX 10.7.2

I have a mac running 9.1.1.

I then built dblink from the contrib directory and I did not
see an install option in the make file.

I tried copying the dblink.so file to the postgresql library directory
but i cannot figure out how to install the definitions..

Any clues would be helpful.

Thanks

Jerry

Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

От
Scott Mead
Дата:

On Sat, Nov 12, 2011 at 1:02 PM, Jerry Levan <jerry.levan@gmail.com> wrote:
I think I have somehow botched my installation of 9.1.1 on Mac OSX 10.7.2

I have a mac running 9.1.1.

I then built dblink from the contrib directory and I did not
see an install option in the make file.

 The Makefile should be including the global.... did you try a 'make install' ?
 

I tried copying the dblink.so file to the postgresql library directory
but i cannot figure out how to install the definitions..

google:
 

 
Any clues would be helpful.

Thanks

Jerry

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

От
Jerry Levan
Дата:
On Nov 12, 2011, at 3:34 PM, Scott Mead wrote:

>
> On Sat, Nov 12, 2011 at 1:02 PM, Jerry Levan <jerry.levan@gmail.com> wrote:
> I think I have somehow botched my installation of 9.1.1 on Mac OSX 10.7.2
>
> I have a mac running 9.1.1.
>
> I then built dblink from the contrib directory and I did not
> see an install option in the make file.
>
>  The Makefile should be including the global.... did you try a 'make install' ?
>
>

I went back and did the make install from the dblink directory it installed
stuff in the share directory but invoking dblink functions failed with
an unknown definition. I invoked the create extension command but it
did no good...

I went back to a previous version and loaded the older dblink.sql file
and it now appears to be working…at least the dblink function calls
that my sql uses is appearently working.

> I tried copying the dblink.so file to the postgresql library directory
> but i cannot figure out how to install the definitions..
>
> google:
>
> http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/dblink/Attic/README.dblink?rev=1.12.4.1
>

This is pre-extension stuff…

>
> Any clues would be helpful.
>
> Thanks
>
> Jerry
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>


Re: Need Help Installing Dblink…(Desperately…)

От
John R Pierce
Дата:
On 11/12/11 10:02 AM, Jerry Levan wrote:
> I have a mac running 9.1.1.
>
> I then built dblink from the contrib directory and I did not
> see an install option in the make file.

did you build this 9.1.1 or is this a standard distribution?   if you
built it, did you install it with `make install` ?   when you built it,
it should have built the contrib automatically, and that should have
been installed to the $SHAREDIR/contrib directory (often in
/usr/share/pgsql91/ or similar)

To install a contributed extension that was built with postgres, simply
execute the SQL command...

     create extension dblink;



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


Re: Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

От
Tom Lane
Дата:
Jerry Levan <jerry.levan@gmail.com> writes:
> On Nov 12, 2011, at 3:34 PM, Scott Mead wrote:
>> The Makefile should be including the global.... did you try a 'make install' ?

> I went back and did the make install from the dblink directory it installed
> stuff in the share directory but invoking dblink functions failed with
> an unknown definition. I invoked the create extension command but it
> did no good...

Vague handwaving like that is an excellent way to guarantee that nobody
can help you, because we can't figure out what you did wrong (or, maybe,
what the code did wrong) based on this.  We need to see exactly what
commands you gave and what results you got.  Please read
http://wiki.postgresql.org/wiki/Guide_to_reporting_problems

(In general, though, in PG 9.1 you do not source contrib SQL scripts
directly.  CREATE EXTENSION is the way to install a contrib module into
a database.)

            regards, tom lane

Re: [GENERAL] Re: [GENERAL] Need Help Installing Dblink…(Desperately…)

От
Jerry Levan
Дата:

On Nov 12, 2011, at 5:49 PM, Tom Lane wrote:

> Jerry Levan <jerry.levan@gmail.com> writes:
>> On Nov 12, 2011, at 3:34 PM, Scott Mead wrote:
>>> The Makefile should be including the global.... did you try a 'make install' ?
>
>> I went back and did the make install from the dblink directory it installed
>> stuff in the share directory but invoking dblink functions failed with
>> an unknown definition. I invoked the create extension command but it
>> did no good...
>
> Vague handwaving like that is an excellent way to guarantee that nobody
> can help you, because we can't figure out what you did wrong (or, maybe,
> what the code did wrong) based on this.  We need to see exactly what
> commands you gave and what results you got.  Please read
> http://wiki.postgresql.org/wiki/Guide_to_reporting_problems
>
> (In general, though, in PG 9.1 you do not source contrib SQL scripts
> directly.  CREATE EXTENSION is the way to install a contrib module into
> a database.)
>
>             regards, tom lane

You are, as usual, correct in your criticism.

My only excuse is that I hit the panic button when things got out
of control ;(

My first bad step was moving the source folder after I built the
main database server, clients, etc and then trying to build the
dblink extension.

It appears that some *.h files had been linked via absolute paths
causing the compilation of the dblink package build to fail.

Moving the source folder back to its original location fixed that problem.

The second difficulty was that I did not understand about extensions and
how to install and enable the rascals.

After I built the documentation and did some reading about extensions I
was able to (I hope) properly install the dblink package. My sql codes
that use dblink now act the same in 9.1.1 as they did in 9.0.x

I will find out for sure tomorrow when I upgrade two more macs…

Jerry