Re: function, that uses different table(names) - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: function, that uses different table(names)
Date
Msg-id 20051102135605.GK12416@webserv.wug-glas.de
Whole thread Raw
In response to Re: function, that uses different table(names)  (Moritz Bayer <moritz.bayer@googlemail.com>)
Responses Re: function, that uses different table(names)
List pgsql-sql
am  02.11.2005, um 14:36:06 +0100 mailte Moritz Bayer folgendes:
> live_table := ''tbl_highscore_app'' || cast($1 as varchar);
> SELECT i_return = max(userid) FROM ''tbl_highscore_app'' || cast($1 as
> varchar);
> 
> My parser tells me that this is not possible.

Correct. You should build your string with the query and execute this
string.

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    === 


pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: function, that uses different table(names)
Next
From: Neil Saunders
Date:
Subject: Re: PGSQL encryption functions