Re: PLPGSQL function schema or table parameter

From: "A(dot) Kretschmer" <akretschmer(at)despammed(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: PLPGSQL function schema or table parameter
Date: 2005-09-05 19:10:29
Message-ID: 20050905191029.GA19305@webserv.wug-glas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am 05.09.2005, um 14:26:31 -0300 mailte Sidnei de Souza folgendes:
> Is it possible to pass a table name and/or schema name to a plpgsql
> function?

Yes.

> How can I use them in the code? Which Types to use for each of the
> parameters?

varchar.

>
> E.g.
>
> create or replace function MyTest (mySchema WhichType?, myTable WhichType?)

varchar, varchar. (possibly other char-types like char(n))

Read
http://www.postgresql.org/docs/8.0/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

Regards, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47212, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Poul Møller Hansen 2005-09-05 20:23:04 Setting up a database for 10000 concurrent users
Previous Message Chris Browne 2005-09-05 17:48:32 Re: More statistics?