Re: [SQL] get branches & childs from database

2004-12-18 Thread Michael Fuhr
On Thu, Dec 16, 2004 at 10:23:23PM +0100, Marcus Krause wrote:

> I'm trying to build up a menu by sending ONE query to database.

See the contrib/ltree module in the PostgreSQL source, or in
whatever package you must install to get the contributed modules.
ltree provides easy ways to query tree-like structures.

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faqs/FAQ.html


[SQL] diff databases

2004-12-18 Thread drdani
Hi,
I'm looking for a tool which can compare structure of two databases 
and produce sql commands (ALTER, DROP, CREATE, etc. if needed) which 
could be used then to convert structure of one database to the other.

I would like to use such a tool for postgresql databases especially.
Daniel
---(end of broadcast)---
TIP 6: Have you searched our list archives?
  http://archives.postgresql.org


[SQL] Revoke on all database

2004-12-18 Thread Henry Molina
Hi all,

Can I revoke "delete" on all database, something like this:

REVOKE DELETE ON DATABASE mydb FROM PUBLIC;

thanks!


-- 
Henry Molina
R&D
CMN Consulting


---(end of broadcast)---
TIP 9: the planner will ignore your desire to choose an index scan if your
  joining column's datatypes do not match


Re: [SQL] Revoke on all database

2004-12-18 Thread Kretschmer Andreas
am  Sat, dem 18.12.2004, um 12:54:33 -0500 mailte Henry Molina folgendes:
> Hi all,
> 
> Can I revoke "delete" on all database, something like this:

on all databases, or on all tables in one database?

> 
> REVOKE DELETE ON DATABASE mydb FROM PUBLIC;

IMHO no, but you can walk through all database via 'psql -l' and then
walk through all tables in every database via 'echo "\d " | psql db'.
You get all tables in all databases and now you can do a 'revoke' on
this tables.

But i'm afraid, there is a better way to do this task...


Andreas
-- 
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung.   Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org) GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster