Re: MS SQL - PostgreSQL - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: MS SQL - PostgreSQL
Date
Msg-id 1126761386.28391.59.camel@Andrea.peacock.de
Whole thread Raw
In response to MS SQL - PostgreSQL  ("Irfan Syukur" <irfan_syukur@bri.co.id>)
Responses Re: MS SQL - PostgreSQL
List pgsql-general
Am Donnerstag, den 15.09.2005, 07:43 +0700 schrieb Irfan Syukur:
> Dear Tino,
>
> In MS SQL, I can execute store procedure that I do not know it's name yet.
>
> A Simplicity example :
>    CREATE   procedure  dbo.sp_run_batch (@as_spname varchar(20)) with recompile as
>
>    declare @li_retstat  smallint,
>         @li_status   numeric(1,0), @ls_mesg   varchar(60)
>
>    exec @li_retstat = @as_spname @as_mesg = @ls_mesg output --(@as_spname = the name of stored procedure)
>    select @li_retstat, @ls_mesg
>    return
>    GO
>
> Can Postgres do that, how ?

Well, not that I know of. But in your example your function has a name.
So you simply:

SELECT dbo.sp_run_batch('something for spname');

I'd suggest you just play with it a bit - with an eye at the
docs.

>
> in MS SQL, there are datetime and timestamp data type, what data type should I use in Postgres

date, timestamp, timestamptz, ... whatever suits your application :)

> btw, this would be worth reading (not only for you ;))
> http://www.netmeister.org/news/learn2quote.html
>

Again ;)

HTH
Tino


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Howto create a plperlu function as user (not superuser)??
Next
From: Tino Wildenhain
Date:
Subject: Re: MS SQL - PostgreSQL