Skip site navigation (1) Skip section navigation (2)

Re: create view ... select fld,'constant',fld ...

From: will trillich <will(at)serensoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: create view ... select fld,'constant',fld ...
Date: 2003-02-01 04:38:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Fri, Jan 31, 2003 at 11:21:05PM -0500, Tom Lane wrote:
> will trillich <will(at)serensoft(dot)com> writes:
> > is this a stupid idea?
> > [create view such that]
> > then we can do things like
> > 	->execute("select parent_table from $table")
> Uh, do you really want to impose overhead on *every* query to make
> that one operation faster?

that's what i was asking. is that a lot of overhead?

> I'd go with a query on the system catalogs, for example
> regression=# create table p (f1 int);
> regression=# create table c (f2 int) inherits(p);
> regression=# select relname from pg_class where
> regression-# oid = (select inhparent from pg_inherits where
> regression(# inhrelid = (select oid from pg_class where relname = 'c'));

my bad, i probably used the wrong terminology.

this isn't inheritance -- it's many-to-one relationship between
tables. below, org can have many projects; projects are tied to
people via many team records.

		due_date => many projects to one org
	team => many teams (projects) for one person => many teams (people) for one project

from what i can tell, the trigger function calls are all there
is to indicate the use of foreign keys. and there's some serious
hair in parsing those \0 strings to get what you want out of
them. seems like there has to be some other mechanism that'd
work with less obtusification.

There are 10 kinds of people:
ones that get binary, and ones that don't.
will(at)serensoft(dot)com -- we need your brain! -- your brain needs us!
Looking for a firewall? Do you think smoothwall sucks? You're
probably right... Try the folks at !

In response to

pgsql-general by date

Next:From: Andrew McMillanDate: 2003-02-01 04:43:48
Subject: Re: [NOVICE] For each record in SELECT
Previous:From: will trillichDate: 2003-02-01 04:28:24
Subject: paradigm sanity check needed [long]

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group