X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 97C114758DC for ; Sun, 2 Feb 2003 12:29:59 -0500 (EST) Received: from serwer.skawsoft.com.pl (serwer.skawsoft.com.pl [213.25.37.66]) by postgresql.org (Postfix) with ESMTP id ED4C0475843 for ; Sun, 2 Feb 2003 12:29:58 -0500 (EST) Received: from klaster.net (pe245.krakow.cvx.ppp.tpnet.pl [213.76.40.245]) by serwer.skawsoft.com.pl (Postfix) with ESMTP id 411572B6F7; Sun, 2 Feb 2003 18:23:50 +0100 (CET) Message-ID: <3E3D56A2.3010000@klaster.net> Date: Sun, 02 Feb 2003 18:34:26 +0100 From: Tomasz Myrta User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; PL; rv:1.1) Gecko/20020826 X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: Vic Cekvenich Cc: pgsql-sql@postgresql.org Subject: Re: help: pgSQL docs and debug References: <3E3D2F9E.2040909@basebeans.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/35 X-Sequence-Number: 11433 Vic Cekvenich wrote: > I need to write some longer pgSQL stored procedures. > > Can you help? > 1. I am looking for a reference of pgSQL functions, etc.? > (I have all the books, they have just a few, I also looked all over the > web). > If you can post a link, tia. Start from "Chapter 19. PL/pgSQL - SQL Procedural Language" on Postgresql documentation. I think, you can find there everything you need for pl/pgsql. After you read this, search techdocs.postgresql.org site. Lots of examples could be find on braseiro.net (don't remember spelling) > > For example, what does the || do in pg SQL with a string? > I am looking at code examples and having a hard time to follow. || has nothing to pl/pgsql. It is a part of SQL standard - string concatenation. > > > 2. How do I debug pgSQL stored procedure? > Right now I write step by step. > Is there a "system.out" in pgSQL? Where does it show? > Is there a GUI editor that helps (I use pgADMIN II). Use "RAISE NOTICE ''My name is: %'',some_row.name " and "RAISE EXCEPTION ..." Regards, Tomasz Myrta