

> -----Original Message-----
> From: Greg Copeland [mailto:greg@CopelandConsulting.Net] 
> Sent: 13 January 2003 20:56
> To: Robert Treat
> Cc: greg@turnstep.com; PostgresSQL Hackers Mailing List
> Subject: Re: [HACKERS] \d type queries - why not views in 
> system catalog?!?
> 
> 
> Oh!
> 
> That's an excellent idea.  Seemingly addresses the issue and 
> has value-add.  I'm not aware of any gotchas here.  Is there 
> something that is being overlooked?

Why use functions instead of views? Most UIs will want to format the
output as they see fit so a recordset would be the appropriate output.
Yes, a function could do this, but surely views would be simpler to
implement and maintain.

Regards, Dave.

Mon, 13 Jan 2003 21:00:44 -0000
"Dave Page" <dpage@vale-housing.co.uk>
Re: \d type queries - why not views in system catalog?!?
Views or C-functions, I think the idea is excellent.  It's the concept
that I really like.

Greg


On Mon, 2003-01-13 at 15:00, Dave Page wrote:
> > -----Original Message-----
> > From: Greg Copeland [mailto:greg@CopelandConsulting.Net] 
> > Sent: 13 January 2003 20:56
> > To: Robert Treat
> > Cc: greg@turnstep.com; PostgresSQL Hackers Mailing List
> > Subject: Re: [HACKERS] \d type queries - why not views in 
> > system catalog?!?
> > 
> > 
> > Oh!
> > 
> > That's an excellent idea.  Seemingly addresses the issue and 
> > has value-add.  I'm not aware of any gotchas here.  Is there 
> > something that is being overlooked?
> 
> Why use functions instead of views? Most UIs will want to format the
> output as they see fit so a recordset would be the appropriate output.
> Yes, a function could do this, but surely views would be simpler to
> implement and maintain.
> 
> Regards, Dave.
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
-- 
Greg Copeland <greg@copelandconsulting.net>
Copeland Computer Consulting


13 Jan 2003 15:42:59 -0600
Greg Copeland <greg@CopelandConsulting.Net>
Re: \d type queries - why not views in system catalog?!?
You have to do it in functions because some of the \ commands use
multiple queries and logic inside the C code. 

Robert Treat

On Mon, 2003-01-13 at 16:42, Greg Copeland wrote:
> Views or C-functions, I think the idea is excellent.  It's the concept
> that I really like.
> 
> Greg
> 
> 
> On Mon, 2003-01-13 at 15:00, Dave Page wrote:
> > > -----Original Message-----
> > > From: Greg Copeland [mailto:greg@CopelandConsulting.Net] 
> > > Sent: 13 January 2003 20:56
> > > To: Robert Treat
> > > Cc: greg@turnstep.com; PostgresSQL Hackers Mailing List
> > > Subject: Re: [HACKERS] \d type queries - why not views in 
> > > system catalog?!?
> > > 
> > > 
> > > Oh!
> > > 
> > > That's an excellent idea.  Seemingly addresses the issue and 
> > > has value-add.  I'm not aware of any gotchas here.  Is there 
> > > something that is being overlooked?
> > 
> > Why use functions instead of views? Most UIs will want to format the
> > output as they see fit so a recordset would be the appropriate output.
> > Yes, a function could do this, but surely views would be simpler to
> > implement and maintain.
> > 
> > Regards, Dave.
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> -- 
> Greg Copeland <greg@copelandconsulting.net>
> Copeland Computer Consulting
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org



13 Jan 2003 17:00:53 -0500
Robert Treat <xzilla@users.sourceforge.net>
Re: \d type queries - why not views in system catalog?!?
What about querying the information_schema?

Chris

> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Robert Treat
> Sent: Tuesday, 14 January 2003 6:01 AM
> To: Greg Copeland
> Cc: Dave Page; greg@turnstep.com; PostgresSQL Hackers Mailing List
> Subject: Re: [HACKERS] \d type queries - why not views in system
> catalog?!?
>
>
> You have to do it in functions because some of the \ commands use
> multiple queries and logic inside the C code.
>
> Robert Treat
>
> On Mon, 2003-01-13 at 16:42, Greg Copeland wrote:
> > Views or C-functions, I think the idea is excellent.  It's the concept
> > that I really like.
> >
> > Greg
> >
> >
> > On Mon, 2003-01-13 at 15:00, Dave Page wrote:
> > > > -----Original Message-----
> > > > From: Greg Copeland [mailto:greg@CopelandConsulting.Net]
> > > > Sent: 13 January 2003 20:56
> > > > To: Robert Treat
> > > > Cc: greg@turnstep.com; PostgresSQL Hackers Mailing List
> > > > Subject: Re: [HACKERS] \d type queries - why not views in
> > > > system catalog?!?
> > > >
> > > >
> > > > Oh!
> > > >
> > > > That's an excellent idea.  Seemingly addresses the issue and
> > > > has value-add.  I'm not aware of any gotchas here.  Is there
> > > > something that is being overlooked?
> > >
> > > Why use functions instead of views? Most UIs will want to format the
> > > output as they see fit so a recordset would be the appropriate output.
> > > Yes, a function could do this, but surely views would be simpler to
> > > implement and maintain.
> > >
> > > Regards, Dave.
> > >
> > > ---------------------------(end of
> broadcast)---------------------------
> > > TIP 4: Don't 'kill -9' the postmaster
> > --
> > Greg Copeland <greg@copelandconsulting.net>
> > Copeland Computer Consulting
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 6: Have you searched our list archives?
> >
> > http://archives.postgresql.org
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>


Tue, 14 Jan 2003 09:39:05 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: \d type queries - why not views in system catalog?!?
On Tue, 2003-01-14 at 01:39, Christopher Kings-Lynne wrote:
> What about querying the information_schema?

Will information_schema be strictly SQL99 or will it also have
PostgreSQL specific views/fields ?

-- 
Hannu Krosing <hannu@tm.ee>

14 Jan 2003 12:55:29 +0000
Hannu Krosing <hannu@tm.ee>
Re: \d type queries - why not views in system catalog?!?
Hannu Krosing <hannu@tm.ee> writes:
> Will information_schema be strictly SQL99 or will it also have
> PostgreSQL specific views/fields ?

If it's not strictly conformant to the spec, I see no value in it at
all.  We already have plenty of ability to query the catalogs via
non-standard queries.

			regards, tom lane

Tue, 14 Jan 2003 10:47:09 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: \d type queries - why not views in system catalog?!? 
On Tue, 2003-01-14 at 15:47, Tom Lane wrote:
> Hannu Krosing <hannu@tm.ee> writes:
> > Will information_schema be strictly SQL99 or will it also have
> > PostgreSQL specific views/fields ?
> 
> If it's not strictly conformant to the spec, I see no value in it at
> all. 

I mean that it could have at least extra *views* for postgresql specific
things. It could also have extra *fields* on standard views, but that
might break some apps. I see no way how having extra views can break
apps.

> > We already have plenty of ability to query the catalogs via
> non-standard queries.

But would it not be nice to have some standard ones, so that each and
every DB management app does not need to invent its own ?

I agree that this could be done as a project at gborg rather than  in
information_schema, but it would still be good to have one standard
place for examples at least. And the only way to keep the examples
up-to-date is by using them in live projects.

-- 
Hannu Krosing <hannu@tm.ee>

14 Jan 2003 18:26:15 +0000
Hannu Krosing <hannu@tm.ee>
Re: \d type queries - why not views in system catalog?!?