Re: Are we losing momentum?

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Dustin Sallings <dustin+postgres(at)spy(dot)net>
Cc: Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Are we losing momentum?
Date: 2003-04-22 17:17:45
Message-ID: Pine.LNX.4.33.0304221109360.9550-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 22 Apr 2003, Dustin Sallings wrote:

> Around 14:26 on Apr 21, 2003, scott.marlowe said:
>
> # Why are those two seperate issues? Why can't the same answer be easily
> # and readily available to both the DBA and the programmer? Why does one
> # have to first use psql -E to figure out the queries needed then figure
> # out which ones to use and not use etc...? I'm not saying the \ commands
> # are bad, I'm saying they're implemented in the wrong place. Having \ in
> # the psql monitor is fine. But it should really be hitting views in the
> # background where possible.
>
> That's part of your database abstraction layer. JDBC does all of
> this stuff for you in a clean way. If you're doing this without a
> database abstraction layer, then you're writing non-portable code unless
> you try to create identical views on every DB you use.
>
> That said, it's not hard to create a view to do what \dt does. I
> still haven't ever had a need to do it, though.

I'm talking more about a setup like what we have here at work. A dozen or
fewer Unix/Linux geeks running the postgresql boxes via ssh with psql who
know SQL and prefer a command line, and about three or four dozen
sales and marketing folks who use Windows programs that access the
database through ODBC.

To the Windows guys, how do I tell them to just create a view
encapsulating:

SELECT c.relname as "Name",
CASE c.relkind WHEN 'r' THEN 'table' WHEN 'v' THEN 'view' WHEN 'i' THEN
'index' WHEN 'S' THEN 'sequence' WHEN 's' THEN 'special' END as "Type",
u.usename as "Owner"
FROM pg_class c LEFT JOIN pg_user u ON c.relowner = u.usesysid
WHERE c.relkind IN ('r','v','S','')
AND c.relname !~ '^pg_'
ORDER BY 1;

if they want a list of the tables, sequences, views and indexes in
postgresql.

It's like asking someone if they want an engine with their car, they just
stare at you for a second wondering if you're joking or something.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2003-04-22 19:34:23 Re: There are advantages to having an odd name
Previous Message Tom Lane 2003-04-22 16:51:00 Re: For the ametures. (related to "Are we losing momentum?")