Re: [SQL] connectby
> hi > > I have menu table: > id | integer | not null default > nextval('public.menu_id_seq'::text) > parent_id | integer | > description | text| > > I do select: > test=> SELECT * FROM connectby('menu','id','parent_id','2',0,'~') t(id > integer, parent_id integer, level int, branch text); > id | parent_id | level | branch > +---+---+- >2 | | 0 | 2 >4 | 2 | 1 | 2~4 >7 | 4 | 2 | 2~4~7 > 10 | 7 | 3 | 2~4~7~10 > 16 |10 | 4 | 2~4~7~10~16 >9 | 4 | 2 | 2~4~9 > > How am I able to select description file from menu table, not only id, > parent_id, level, branch fields? > > -- > WBR, sector119 Try a join with the original table: SELECT t.*, description FROM connectby('menu','id','parent_id','2',0,'~') AS t(id integer, parent_id integer, level int, branch text), menu WHERE t.id = menu.id George Essig ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [SQL] search facilities
Download the latest version of PostgreSQL and look in the contrib/tsearch or contrib/tsearch2 directories. For documentation, see: http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ http://sourceforge.net/mailarchive/forum.php?forum_id=7671 George Essig ___ Original Message: Hi, I have a content management system, for my database driven website developed using php and postgresql but I don't know how to develop a search facility for it. How do I go about it?. I have seen database driven website developed using php and postgresql and they have their built search facilities where can I learn to develop my customized search facility please do advice. Kind Regards +-+ | Martin W. Kuria (Mr.) [EMAIL PROTECTED] ++ ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [SQL] connectby
> I use postgresql 7.2.3 > How can I use connectby ?? > > Must I install files ? or packages ? or it is recommanded to upgrade dataserver ? For recent versions of PostgreSQL, go into the contrib/tablefunc directory and see the readme file for how to install. I downloaded PostgreSQL 7.2.3 and there was no contrib/tablefunc directory. You'll have to upgrade. George Essig ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [SQL] Moving from Transact SQL to PL/pgsql
> ... > Where can I find > primer on PL/pgsql, with lots of examples? > ... Download openacs at http://openacs.org/projects/openacs/download/. Look at directories matching the pattern openacs-*/packages/*/sql/postgresql/. The older openacs version 4.6.3 has more examples than openacs 5. George Essig ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster