Re: function, that uses different table(names)
От | A. Kretschmer |
---|---|
Тема | Re: function, that uses different table(names) |
Дата | |
Msg-id | 20051102133852.GH12416@webserv.wug-glas.de обсуждение исходный текст |
Ответ на | function, that uses different table(names) (Moritz Bayer <moritz.bayer@googlemail.com>) |
Список | pgsql-sql |
am 02.11.2005, um 14:30:38 +0100 mailte Moritz Bayer folgendes: > Hello group, > > I've a bunch of tables, which have just about the same name. They are just > iterated like this: > > tbl_table1 > tbl_table2 > tbl_table3 > ... > > They all have the same field, but different data. > > Now I'm wondering, if I have to write functions for every table, although > they perform the same operation? > Or is it possible to pass an integer parameter to the function, use it to > put the right tablename together and perform the operation. Yes, this is possible. Please read the documentation: http://www.postgresql.org/docs/8.0/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN HTH, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net=== Schollglas Unternehmensgruppe ===
В списке pgsql-sql по дате отправления: