Re: function, that uses different table(names)

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: function, that uses different table(names)
Дата
Msg-id 20051102135605.GK12416@webserv.wug-glas.de
обсуждение исходный текст
Ответ на Re: function, that uses different table(names)  (Moritz Bayer <moritz.bayer@googlemail.com>)
Ответы Re: function, that uses different table(names)  (Moritz Bayer <moritz.bayer@googlemail.com>)
Список 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 по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: function, that uses different table(names)
Следующее
От: Neil Saunders
Дата:
Сообщение: Re: PGSQL encryption functions