Re: [GENERAL] stored proc

2011-09-29 Thread Jacqui Caren-home
On 29/09/2011 02:34, J.V. wrote: Is it possible to group a bunch of methods and functions into a single file (stored procedures & functions) and have a main method that can be called to orchestrate the methods, pass in params, get back results, log to a file? I know this can be done with Oracle

[GENERAL] stored proc

2011-09-28 Thread J.V.
Is it possible to group a bunch of methods and functions into a single file (stored procedures & functions) and have a main method that can be called to orchestrate the methods, pass in params, get back results, log to a file? I know this can be done with Oracle PL/SQL but a simple google on th

Re: [GENERAL] stored proc - how to format numbers?

2011-09-21 Thread Raymond O'Donnell
On 21/09/2011 19:36, J.V. wrote: > In PostgreSQL (9.x), I have a variable that I want to format with commas. > > I do not know how many digits will be in the number, it could be an int > (2Billion+) or a BigInt (18 digits or more). > > All I simply want to do is to use: to_number( and have the c

[GENERAL] stored proc - how to format numbers?

2011-09-21 Thread J.V.
In PostgreSQL (9.x), I have a variable that I want to format with commas. I do not know how many digits will be in the number, it could be an int (2Billion+) or a BigInt (18 digits or more). All I simply want to do is to use: to_number( and have the commas put in before display. There are

Re: [GENERAL] Stored Proc Problem

2007-07-30 Thread Tom Lane
Robert Landrum <[EMAIL PROTECTED]> writes: > I'm writing a stored procedure that will execute as a trigger. > Arguments being passed to the procedure are field names. > My goal is to convert those field names into the field values. However, > I've not been successful. I thought that the follow

[GENERAL] Stored Proc Problem

2007-07-30 Thread Robert Landrum
I'm writing a stored procedure that will execute as a trigger. Arguments being passed to the procedure are field names. My goal is to convert those field names into the field values. However, I've not been successful. I thought that the following should have worked. EXECUTE ''field_val := N

Re: [GENERAL] stored proc vs sql query string

2006-04-10 Thread Mark Aufflick
On 4/7/06, Jim Nasby <[EMAIL PROTECTED]> wrote: > You're forgetting that (at least in plpgsql), "raw" queries get > compiled into prepared statements. Prepared statements are faster to > execute than queries that have to be manually parsed every time. Of > course you can pass in prepared statements

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Jim Nasby
On Apr 6, 2006, at 6:39 AM, Sean Davis wrote: On 4/6/06 12:12 AM, "surabhi.ahuja" <[EMAIL PROTECTED]> wrote: i have heard somewhere that writing a stored procedure, is much better than firing a sql query(such as select * from table_name) onto the database. is it true and if yes how? This

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Chris Browne
[EMAIL PROTECTED] ("surabhi.ahuja") writes: > i have heard somewhere that writing a stored procedure, is much > better than firing a sql query(such as select * from > table_name) onto the database. > > is it true and if yes how? It can be way more efficient. Consider two alternative ways of handl

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Kenneth Downs
Merlin Moncure wrote: It has been more or less proven that functional, declaritive style coding has less errors and is more reliable than mixed sql/procedural applciation code given developers with equal skill. I did not know there were empirical studies on this, I would love to be able to re

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Merlin Moncure
> > i have heard somewhere that writing a stored procedure, is much better than > > firing a sql query(such as select * from table_name) onto the database. > > is it true and if yes how? stored procedures (functions on postgresql) eliminate a lot of overhead. they also provide a lot of covenience

Re: [GENERAL] stored proc vs sql query string

2006-04-06 Thread Sean Davis
On 4/6/06 12:12 AM, "surabhi.ahuja" <[EMAIL PROTECTED]> wrote: > i have heard somewhere that writing a stored procedure, is much better than > firing a sql query(such as select * from table_name) onto the database. > is it true and if yes how? This isn't going to be true most of the time, I th

[GENERAL] stored proc vs sql query string

2006-04-05 Thread surabhi.ahuja
i have heard somewhere that writing a stored procedure, is much better than firing a sql query(such as select * from table_name) onto the database. is it true and if yes how?   also i want to know that is the performnance in java slower as compared to cpp, given that the same things is being do

Re: [GENERAL] stored proc help

2005-07-13 Thread Michael Fuhr
On Wed, Jul 13, 2005 at 01:28:45PM -0500, Jason Tesser wrote: > I have the following store dproc but when I run it I am getting the > error > > ERROR: invalid input syntax for integer: "(1)" > CONTEXT: PL/pgSQL function "irispermissionget" line 9 at return next > > What am I doing wrong? The

[GENERAL] stored proc help

2005-07-13 Thread Jason Tesser
I have the following store dproc but when I run it I am getting the error   ERROR:  invalid input syntax for integer: "(1)" CONTEXT:  PL/pgSQL function "irispermissionget" line 9 at return next   What am I doing wrong?   CREATE OR REPLACE FUNCTION "public"."irispermissionget" (usern

Re: [GENERAL] Stored Proc error after modifying field type

2003-07-02 Thread Együd Csaba
Tom, what do you think about the folowing: I updated the server field of my DSN to point to the postgres runniong under cygwin on the localhost. The error does not appear at all. -- 1 06:29:42 SQL Prepare: PostgreSQL - { call "addincominginvoice" (?,?,?,?,?,?

Re: [GENERAL] Stored Proc error after modifying field type

2003-07-02 Thread Együd Csaba
MAIL PROTECTED]> Sent: Wednesday, July 02, 2003 6:23 PM Subject: Re: [GENERAL] Stored Proc error after modifying field type > =?iso-8859-2?Q?Egy=FCd_Csaba?= <[EMAIL PROTECTED]> writes: > > alumil=# \df addincominginvoice > >

Re: [GENERAL] Stored Proc error after modifying field type

2003-07-02 Thread Tom Lane
=?iso-8859-2?Q?Egy=FCd_Csaba?= <[EMAIL PROTECTED]> writes: > alumil=# \df addincominginvoice > List of functions > Result data type | Schema |Name| > Argument data types > --+++---

Re: [GENERAL] Stored Proc error after modifying field type

2003-07-02 Thread Együd Csaba
Sorry for posting many times! -- Csaba --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.491 / Virus Database: 290 - Release Date: 2003. 06. 18. ---(end of broadcast)--- TIP 9: the p

Re: [GENERAL] Stored Proc error after modifying field type

2003-07-02 Thread Együd Csaba
- -- This trace is provided by the psqlODBC driver. Can you find anything in this log, which can cause the error? Thank you, -- Csaba - Original Message - From: "Tom Lane" <[EMA

Re: [GENERAL] Stored Proc error after modifying field type

2003-07-02 Thread Tom Lane
=?iso-8859-1?Q?Egy=FCd_Csaba?= <[EMAIL PROTECTED]> writes: > ERROR: Function addincominginvoice(integer, integer, "unknown", "unknown", > "unknown", "unknown", integer, "unknown", "unknown", "unknown", "unknown", > double precision) does not exist > Unable to identify a function that satisfies the

[GENERAL] Stored Proc error after modifying field type

2003-07-02 Thread Együd Csaba
Hi, I've a problem with some of my stored procs. My config is: RH7.1, Postgres 7.3.2 I had converted a few fields of a few tables from one type to another and after this I made all the necessary changes on the functions and recreated all my types and functions. It seemd to be all right, but the ne