Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]

From: Herve Lefebvre <aegir(at)rocketmail(dot)com>
To: Bruce Tong <zztong(at)laxmi(dot)ev(dot)net>, The Hermit Hacker <scrappy(at)hub(dot)org>
Cc: PostgreSQL-general <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]
Date: 1998-07-22 14:39:12
Message-ID: 19980722143912.12067.rocketmail@web2.rocketmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

---Bruce Tong <zztong(at)laxmi(dot)ev(dot)net> wrote:
> > features != ANSI SQL compliance, right?
>
> I suppose ANSI SQL is the heart of it.
>
> > Again, what are we missing that Oracle currently has...?
>

Stored procedures with tuples resultset:

SELECT F1,F2,F3 FROM TABL1

And Multi-resultsets stored-procedures:

SELECT F1,F2 FROM TABLE1
SELECT F3,F4,F5 FROM TABLE2

And how can we declare/use variables with PG-SQL ?

With Sybase (and oracle) I can do that:

PROCECURE p (@org_account int, @dest_account int, @amount money)
as
DECLARE @balance money
BEGIN TRAN
SELECT @balance=balance
FROM account_table
WHERE @account_num=(at)org_account

/* Check if enough money on the account */
IF @balance<@amount
BEGIN
ROLLBACK TRAN
RETURN -1 /* Not enough money */
END

/* proceed with the updates */
...

COMMIT TRAN
RETURN 0
go

How to do a such stored procedure with pgSQL ? (please, don't say me
to write it in C language ).

--
H.L.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

Browse pgsql-general by date

  From Date Subject
Next Message James Olin Oden 1998-07-22 14:39:58 Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]
Previous Message Maarten Boekhold 1998-07-22 14:14:40 Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]