Re: MS SQL - PostgreSQL

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>, Irfan Syukur <irfan_syukur(at)bri(dot)co(dot)id>
Subject: Re: MS SQL - PostgreSQL
Date: 2005-09-15 05:16:25
Message-ID: 1126761386.28391.59.camel@Andrea.peacock.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tino Wildenhain 2005-09-15 05:29:14 Re: MS SQL - PostgreSQL
Previous Message Brent Wood 2005-09-15 03:57:50 Re: Howto create a plperlu function as user (not superuser)??