Search Postgresql Archives

Re: MS SQL - PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux