question on plpgsql block

Поиск
Список
Период
Сортировка
От Karthikeyan Sundaram
Тема question on plpgsql block
Дата
Msg-id BAY131-W19843640CD2CBC297E50AAB05E0@phx.gbl
обсуждение исходный текст
Ответы Re: question on plpgsql block  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-admin
Hi Gurus,
 
    I tried a plpgsql block from the php.
 
    example
 
    a='begin
      insert into table a values (....);
      insert into table b values (....)
     insert into table c values (...)
     select into p_var ... from table where condtion
     update a set column = <new value> where condition;
    commit;
    end;';
   
    I works fine when I call this block from php, whereas, I tried to copy the same value from the command line prompt or PGadmin GUI utility.  Then it says "ERROR:  current transaction is aborted, commands ignored until end of transaction block"
 
  Why?
 
   Did we need to do any special step up to execute a block or blocks won't execue from command line mode? Please advise.
 
Regards
skarthi
 
 
 


Your friends are close to you.  Keep them that way.

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Where are aliases stored?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: question on plpgsql block