Re: [GENERAL] function return update count

2012-01-06 Thread Richard Huxton
On 06/01/12 16:33, David Johnston wrote: In 9.1 you could use and updatable CTE and in the main query perform and return a count. I would think plpgsql would be the better option though. For the SQL option, it would be this (9.1 only though - I think David's right there). CREATE FUNCTION f1

Re: [GENERAL] function return update count

2012-01-06 Thread David Johnston
In 9.1 you could use and updatable CTE and in the main query perform and return a count. I would think plpgsql would be the better option though. On Jan 6, 2012, at 2:29, Andreas Kretschmer wrote: > > Kevin Duffy hat am 6. Januar 2012 um 00:32 > geschrieben: > > Hello: > > I am try to g

Re: [GENERAL] function return update count

2012-01-06 Thread Andreas Kretschmer
Kevin Duffy hat am 6. Januar 2012 um 00:32 geschrieben: > Hello: > > I am try to get a function to return the count of the rows updated within the > function. > As in the following, I wan the number of rows updated to be returned. > > This is a simple update, other update statements that

Re: [GENERAL] function return update count

2012-01-05 Thread Misa Simic
Sorry, Option 1) is wrong answer... :) Option 2 should work Sent from my Windows Phone -- From: Misa Simic Sent: 06/01/2012 08:34 To: Kevin Duffy; pgsql-general@postgresql.org Subject: RE: [GENERAL] function return update count You could try: 1) return UPDATE

Re: [GENERAL] function return update count

2012-01-05 Thread Misa Simic
: [GENERAL] function return update count Hello: I am try to get a function to return the count of the rows updated within the function. As in the following, I wan the number of rows updated to be returned. This is a simple update, other update statements that I need to write will be complicated. CREATE

[GENERAL] function return update count

2012-01-05 Thread Kevin Duffy
Hello: I am try to get a function to return the count of the rows updated within the function. As in the following, I wan the number of rows updated to be returned. This is a simple update, other update statements that I need to write will be complicated. CREATE OR REPLACE FUNCTION est_idio_retu