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

[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 - 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 commas

[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 :=

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 following

Re: [GENERAL] stored proc vs sql query string

2006-04-11 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 from

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 think.

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 of

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: [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 handling

[GENERAL] stored proc vs sql query string

2006-04-05 Thread surabhi.ahuja
i have heard somewhere that writinga 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

[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 (username varchar,

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 function

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 given argument types

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

2003-07-02 Thread Egyd Csaba
cause the error? Thank you, -- Csaba - Original Message - From: Tom Lane [EMAIL PROTECTED] To: Egyd Csaba [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 5:41 PM Subject: Re: [GENERAL] Stored Proc error after modifying field type =?iso-8859-1?Q?Egy=FCd_Csaba?= [EMAIL

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

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 Egyd Csaba
: [GENERAL] Stored Proc error after modifying field type =?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 Egyd 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