![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, struggling around with this for some time: How can I use a table name as a parameter in a PL/pgSQL function ?? I tried this but it didn't work... CREATE OR REPLACE FUNCTION my_row_count(text) RETURNS int4 AS ' DECLARE num_rows int4; BEGIN num_rows := (select count(*) from $1); RETURN num_rows; END; ' LANGUAGE plpgsql; Thnaks for any input! regards, alex. ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org |
![]() |
| Thread Tools | |
| Display Modes | |
| |