Re: PL/PGSQL + inserts+updates+limit - Postgres 9.3
От | Patrick B |
---|---|
Тема | Re: PL/PGSQL + inserts+updates+limit - Postgres 9.3 |
Дата | |
Msg-id | CAJNY3iuo6hE52VkqmS0TJxLYttcU6BtaJPM5LM=cz6O6XMPNoQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PL/PGSQL + inserts+updates+limit - Postgres 9.3 ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: PL/PGSQL + inserts+updates+limit - Postgres 9.3
|
Список | pgsql-general |
Ok so guys....
CREATE or REPLACE FUNCTION function_data_1()RETURNS SETOF bigint AS $$declarerow record;BEGIN[...]FOR row IN EXECUTE 'SELECTt1.file_id,t1.path,t1.account_idFROMtable1 t1JOINtable3 t3 ON t3.file_Id = t1.file_idWHEREt3.migrated = 0ANDt3.account_id = 1112ORDER BY 1 LIMIT 30 '[...]
How can I make the function works with account_id?
Example: select function_data_1(1112)
Example: select function_data_1(1112)
and then it will do all the work just for that specific account_id?
If you guys please could give me the way to do that..
thanks
Patrick
В списке pgsql-general по дате отправления: