Re: connectby documentation - Mailing list pgsql-sql

From Daniel Caune
Subject Re: connectby documentation
Date
Msg-id 1E293D3FF63A3740B10AD5AAD88535D201C6B1F2@UBIMAIL1.ubisoft.org
Whole thread Raw
In response to connectby documentation  ("Daniel Caune" <daniel.caune@ubisoft.com>)
Responses Re: connectby documentation
List pgsql-sql
> > > Sorry, this is not my day: "apt-get install
postgresql-contrib-8.1"
> > > works fine...  Just a link on the documentation that fully
explains
> how
> > > connectby() works would be great! :-)
> >
> > The contrib package should have installed a file named
> README.tablefunc.
> >
>
> You are right.  The documentation is located in
> /usr/share/doc/postgresql-contrib-8.1/ .
>
> Wow, that was the quest for the Holy Grail! :-)
>

Huh... It seems that installing the package postgresql-contrib does not
make the work itself.

I provide hereafter a description about how to install the function
connectby (I didn't find such documentation and I don't know where to
write this documentation):

> apt-get install postgresql-contrib-8.1
> emacs /usr/share/postgresql/8.1/contrib/tablefunc.sql

Replace "$libdir" by "/usr/lib/postgresql/8.1/lib/tablefunc.so" (I
suggest to modifying only a copy of this file).

> su postgres
> psql -f /usr/share/postgresql/8.1/contrib/tablefunc.sql <database>


You can check that the work is done as follows:

> psql <database>

<database> => \df connectby                                 List of functionsSchema |   Name    | Result data type |
        Argument data types 

--------+-----------+------------------+--------------------------------
-------------public | connectby | setof record     | text, text, text, text, integerpublic | connectby | setof record
 | text, text, text, text, 
integer, textpublic | connectby | setof record     | text, text, text, text, text,
integer, text


I hope that will help another PostgreSQL newbie.

--
Daniel


pgsql-sql by date:

Previous
From: "Daniel Caune"
Date:
Subject: Re: connectby documentation
Next
From: Michael Fuhr
Date:
Subject: Re: connectby documentation