pls reply ASAP

Поиск
Список
Период
Сортировка
От Chethana, Rao (IE10)
Тема pls reply ASAP
Дата
Msg-id C7AD32F362B7914488D0267D1537DDC9CDDE6A@AZ18EV805.global.ds.honeywell.com
обсуждение исходный текст
Ответы Re: pls reply ASAP
Список pgsql-performance

Hello!

 

Kindly go through the following ,

 

 

I wanted to know whether, the command line arguments(function arguments) ------  $1 $2 $3   --  can be used  as in the following , like, ----

 

 

CREATE TYPE TT AS(something,something,…………………………………………………………etc………………);

CREATE OR REPLACE FUNCTION f1(varchar,varchar,varchar,varchar) RETURNS …………………..(something)………….

 

BEGIN

 SELECT a1,a2,a3,a4,a5,a6

 FROM (SELECT * FROM T1, T2……WHERE …………etc…   Flag = 0   $1 $2 $3 $4)

 ORDER BY ……………………                                                                   

………………………….

RETURN NEXT ………;

  END LOOP;

  RETURN;

END;

' LANGUAGE 'plpgsql';

 

NOTE :    The values for  $1 $2 $3 $4  will be passed when the function is invoked(called)  from the command prompt.

 

I  tried implementing the above, but  this type of usage is not supported , how should use it? 

 

 I am converting  from (sprintf, “SELECT query stmts (which uses   %s %s %s %s  …… )        to functions.

 

 

Any help will be deeply appreciated.  Thank you.

 

 

Kind regards,

      Chethana.

 

 

 

Вложения

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

Предыдущее
От: Brendan Duddridge
Дата:
Сообщение: OT: Data structure design question: How do they count so fast?
Следующее
От: "Doron Baranes"
Дата:
Сообщение: