Andre Schnoor wrote:
Joshua D. Drake wrote:
Andre Schnoor wrote:
Hi,
I am moving from Sybase to pgsql but have problems with stored procedures.
The typical procedure uses
a) named parameters,
b) local variable declarations and assignments
c) transactions
d) cursors, views, etc.
I can't seem to
Hi,
I am moving from Sybase to pgsql but have problems with stored procedures.
The typical procedure uses
a) named parameters,
b) local variable declarations and assignments
c) transactions
d) cursors, views, etc.
I can't seem to find these things in the Postgres function syntax.
Procedures can
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
a.
http://www.postgresql.org/docs/8.0/interactive/plpgsql-
declarations.html
b. (same page)
c. ?
d.
http://www.postgresql.org/docs/8.0/interactive/plpgsql-control-
structures.html#PLPGSQL-RECORDS-ITERATING
This brings about a new question:
Andre Schnoor wrote:
Hi,
I am moving from Sybase to pgsql but have problems with stored procedures.
The typical procedure uses
a) named parameters,
b) local variable declarations and assignments
c) transactions
d) cursors, views, etc.
I can't seem to find these things in the Postgres function
--- Frank D. Engel, Jr. [EMAIL PROTECTED]
escribió:
a.
http://www.postgresql.org/docs/8.0/interactive/plpgsql-
declarations.html
b. (same page)
c. ?
d.
http://www.postgresql.org/docs/8.0/interactive/plpgsql-control-
structures.html#PLPGSQL-RECORDS-ITERATING
This brings about
Joshua D. Drake wrote:
Andre Schnoor wrote:
Hi,
I am moving from Sybase to pgsql but have problems with stored procedures.
The typical procedure uses
a) named parameters,
b) local variable declarations and assignments
c) transactions
d) cursors, views, etc.
I can't seem
CREATE PROCEDURE do_something
@song_id int,
@user_id int,
@method int,
@length int = 0,
@date_exact datetime,
@default_country int = null
AS
-- temporary variables
DECLARE
@artist int,
@sample int,
@date varchar(32),
@country int
Have you tried looking at this section of the manual?
http://www.postgresql.org/docs/7.4/interactive/plpgsql.html
It details all the PL/pgSQL language constructs - I found it fine when
converting from Oracle to Postgres...
Just make sure you have installed the pl/pgsql language in template1 or
[EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
CREATE PROCEDURE do_something
@song_id int,
@user_id int,
@method int,
@length int = 0,
@date_exact datetime,
@default_country int = null
AS
-- temporary variables
DECLARE