Re: Schemas: status report, call for developers

From: "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Schemas: status report, call for developers
Date: 2002-05-06 21:09:25
Message-ID: Pine.LNX.4.21.0205062158350.2674-100000@ponder.fairway2k.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

On Mon, 6 May 2002, Nigel J. Andrews wrote:
>
> On Mon, 6 May 2002, Tom Lane wrote:
>
> > "Nigel J. Andrews" <nandrews(at)investsystems(dot)co(dot)uk> writes:
> > > Coming back to this subject if I may but only briefly, I hope. How
> > > about making a slight change to current_schemas() and including an
> > > optional argument such that something like:
> > > current_schemas(1)
> > > returns the complete list of schemas in the search path including the
> > > implicit temporary space and the pg_catalog (if not already listed
> > > obviously), while current_schemas() and current_schemas(0) behave as
> > > now.
> >
> > I don't really care for that syntax, but certainly we could talk about
> > providing a version of current_schemas that tells the Whole Truth.

Wouldn't such a function just be based on
backend/catalog/namespace.c:RelnameGetRelid(const char *relname) ?

> > I'm suspecting that what we really need is some kind of
> > "is_visible_table()" test function, and then you'd do
> > select * from pg_class where is_visible_table(oid);
> > At least I've not been able to think of a better idea than that.
>
> [snip]

For this if we look once again at RelnameGetRelid(relname) in
backend/catalog/namespace.c wouldn't this is_visible() function simply be a
wrapper around it? Obviously the parameter [probably] wouldn't be an OID but
rather a name.

If I knew which file would be most appropiate for this (utils/adt/name.c?) I'd
have had a go at making a patch.

--
Nigel J. Andrews
Director

---
Logictree Systems Limited
Computer Consultants

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jack 2002-05-06 22:23:38 Re: STILL LACKING: CVS tag for release 7.2.1
Previous Message Joe Conway 2002-05-06 20:22:05 Re: a couple of minor itches: RI Trigger Names, and additional

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2002-05-06 22:56:27 Re: Schemas: status report, call for developers
Previous Message jtv 2002-05-06 20:35:37 Re: Using C functions with triggers