Skip site navigation (1) Skip section navigation (2)

Moving from MS SQL Server to PostgreSql 8.3

From: dvanatta <dvanatta(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Moving from MS SQL Server to PostgreSql 8.3
Date: 2009-10-01 16:15:24
Message-ID: 25699423.post@talk.nabble.com (view raw or flat)
Thread:
Lists: pgsql-novice
I am converting my Sql Server stored procs to Postrgre functions.  I have the
following stored proc:

create stored procedures (@lastname varchar(50))
as
select
 firstname
,lastname
from users 
where lastname = @lastname

Looking at the documentation for Postgres functions has me confused.  I
don't want to create a Table Type for each of my stored procs.  I am wanting
the function to have minimal syntax as possible, like the Sql Server stored
proc.  I read somewhere -- can't find it now -- that Postgres 8.3 had some
"syntactical sugar" to make functions act more like Sql Server stored procs
with less syntax.

Can someone please show me what this simple stored proc would look like in
Postgres 8.3 with minimal syntax?

Thanks
-- 
View this message in context: http://www.nabble.com/Moving-from-MS-SQL-Server-to-PostgreSql-8.3-tp25699423p25699423.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2009-10-01 16:25:08
Subject: Re: Connect to database with php pg_connect, cannot find table even though it shows up on psql connection
Previous:From: Mary AndersonDate: 2009-10-01 15:40:47
Subject: Connect to database with php pg_connect, cannot find table even though it shows up on psql connection

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group