Computed table name in function

From: "Ray Madigan" <ray(at)madigans(dot)org>
To: "Pgsql-Sql" <pgsql-sql(at)postgresql(dot)org>
Subject: Computed table name in function
Date: 2007-10-10 17:59:28
Message-ID: IIEPJABILGOCODDLDNJFOEEFCCAA.ray@madigans.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a problem that I don't know where to look to understand the problem.

I have a function that I first select to get a table name followed by
another select into on that table name. If someone could tell me where to
look to solve this problem I would appreciate it.

It is something like

DECLARE rec1 Record;
rec2 Record;

SELECT aName INTO rec1 FROM tableA WHERE new.xxx = ?;

IF FOUND THEN

SELECT * INTO rec2 FROM rec1.aName where new.xxx = ?;

Thanks

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Scott Marlowe 2007-10-10 18:10:02 Re: Computed table name in function
Previous Message George Pavlov 2007-10-10 17:13:45 Re: finding unused indexes?