> > > 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