pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ray Madigan <ray@madigans.org>
To: Pgsql-Sql <pgsql-sql@postgresql.org>
Subject: Computed table name in function
Date: Wed, 10 Oct 2007 10:59:28 -0700
Message-ID: <IIEPJABILGOCODDLDNJFOEEFCCAA.ray@madigans.org> (raw)

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




view thread (5+ messages)  latest in thread

Message-ID: <IIEPJABILGOCODDLDNJFOEEFCCAA.ray@madigans.org>
Permalink:  ../IIEPJABILGOCODDLDNJFOEEFCCAA.ray@madigans.org/
Also on:    postgresql.org/message-id/IIEPJABILGOCODDLDNJFOEEFCCAA.ray@madigans.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ray@madigans.org
  Subject: Re: Computed table name in function
  In-Reply-To: <IIEPJABILGOCODDLDNJFOEEFCCAA.ray@madigans.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox