473,765 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stored Procedures in PostgreSQL

3 New Member
hi I'm changind of BD from SQL to postgreSQL and I wanna know how to do this stored procedure in postgres

Expand|Select|Wrap|Line Numbers
  1. create Procedure [dbo].[ConsultarDepartamento]
  2. As
  3.     BEGIN
  4.         Select * From Departamento
  5.     END
  6.  
thx
May 25 '07 #1
1 2885
michaelb
534 Recognized Expert Contributor
Please read the Posting Guidelines at the top of the Forum, particularly the section about using formatting tags (CODE, etc)

------------------------------------------------------------------------------------
Stored procedures in Postgresql are implemented as functions.
Start with reading these manuals, if you have any problems with implementation post your questions or your code and we'll take it from there.

CREATE FUNCTION
SQL Functions
Porting from Oracle functions
Pl/Pgsql
May 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
9620
by: FET | last post by:
Hello, I am in a bit of a conflict here. I would like to know if the stored procedures that I write in PL/PGSQL to run on PostgreSQL 7.4.2 are ANSI compliant. The point of asking this question is whether my stored procedure needs to undergo a lot of change if I port it to some other database like Oracle or MSSQL Server. Thank you in advance, Best regards.
4
3916
by: My Deja | last post by:
I need examples of stored procedures returning datasets. Can anyone point me to some examples?
5
3486
by: Tim Marshall | last post by:
I was following the thread "Re: Access Treeview - Is it Safe Yet?" with interest and on reading the post describing Lauren Quantrell's SmartTree, I've run into something I don't understand: Stored Procedures. I thought stored pricedures were an Oracle/MS SQL Server thing and don't know how they work with Access Jet. I've looked at some of the help on stored procedures in A2003, but really don't understand what's going on. Can someone...
4
5746
by: Bill Moran | last post by:
I'm having a little trouble understanding how to do something. I assume I'm just missing it in the documentation, so a pointer to relevent docs would be as welcome as a direct answer. I have a project in which I'll need to create a number of stored procedures that are basically wrappers around complex SQL statements. Along the lines of: CREATE OR REPLACE FUNCTION expired(anyelement) RETURNS SETOF anyelement AS ' SELECT *
5
2277
by: Jurgen Defurne | last post by:
I am currently designing an application which should be accessible from different interfaces. For this I like to be using stored procedures to process the contents of form submissions and dialog screens. After studying the PG database, it seems to me that I can fulfill the following requirements. a) The basic contents of the internal data dictionary can be used to check incoming fields from on their length and permitted contents.
1
1423
by: Lars Erik Thorsplass | last post by:
I have recently ventured into the exciting world of stored procedures, but I have now become lost. Background: Am currently working on access control in a web application. My goal is to process access control on the SQL level. This way if a row is in the result set, you have access to it, if not, you dont.
1
1272
by: Secrétariat | last post by:
Hello ! My ODBC driver in MS Visual Basic 6 refers also to "Stored procedures" as Record source. What are these stored procedures, I don't find anything in the 7.4 documentation, Where can I find documentation ? Many thanks. Luc
1
1591
by: E.T. Grey | last post by:
Hi All, Despite spending the past six to seven hours perusing the docs on the mySQl site, I still have questions unanswered, and have been unable to get any help. I am familiar with Sybase, some Oracle and PostgreSQL - but the mySQL SQL seems a bit "non-standard". I would be very grateful for any help I get in answering these questions: Stored procedures
1
13538
by: patmuga | last post by:
Would someone recommend a good tutorial on stored procedures using Postgresql. Thanks
1
2087
by: nishi.hirve | last post by:
Hello, I am writing one simple application in C# in which i m writing some queries for retriving data from database. Database used is postgeSQL which is used through ODBC. I want to write queries using stored procedures, I don't know where to write stored procedures for postgreSQL. I have written them for sqlServer but not for postgreSQL.
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.