Table as parameter in function

Поиск
Список
Период
Сортировка
От Kaare Rasmussen
Тема Table as parameter in function
Дата
Msg-id 199903092047.VAA03405@bohr.webline.dk
обсуждение исходный текст
Ответ на Re: [GENERAL] Calcuate percentage.  (Sze Yuen Wong <swong_@yahoo.com>)
Список pgsql-general
As I tried to make a function for this percent calculation I fell over
the problem of passing a table to the function. I'd like to make this
function:

create function NumRows(table) returns int4
as 'select count(*) from $1'
language 'sql';

Is this possible?


В списке pgsql-general по дате отправления:

Предыдущее
От: Naceur
Дата:
Сообщение: Postgres tutorial examples !
Следующее
От: Kaare Rasmussen
Дата:
Сообщение: Re: [GENERAL] Calcuate percentage.