Re: How to convert SQL store procedure to Postgresql function
От | Filip Rembiałkowski |
---|---|
Тема | Re: How to convert SQL store procedure to Postgresql function |
Дата | |
Msg-id | CAP_rwwmWSh2o0hbatj+dFL1r612jg_B+oSf6qM02GtJM-dW24Q@mail.gmail.com обсуждение исходный текст |
Ответ на | How to convert SQL store procedure to Postgresql function (Rehan Saleem <pk_rehan@yahoo.com>) |
Ответы |
Re: How to convert SQL store procedure to Postgresql function
Re: How to convert SQL store procedure to Postgresql function |
Список | pgsql-sql |
On Tue, Feb 28, 2012 at 9:50 AM, Rehan Saleem <pk_rehan@yahoo.com> wrote: > hi , > how can i convert this sql store procedure to postgresql function , i shall > be very thankful to you, as i am new to postgresql and i dont know how to > handle this kind of store procedure in postgresql Most people handle this with user-defined functions (UDF) written in PL/PgSQL procedural language. Try to read The Friendly Manual http://www.postgresql.org/docs/current/static/sql-createfunction.html http://www.postgresql.org/docs/current/static/plpgsql.html Don't worry - all Transact-SQL constructs have their equivalent. Just start rewriting your function and begin asking specific questions here... People will help. I would begin with create or replace function sp_GetUserByID( in_UserId varchar(50), ...) returns varchar(50) language plpgsql as $$ declare ... begin...return somevariable; end; $$; HTH, Filip
В списке pgsql-sql по дате отправления: