Hi,
On 2 January 2012 03:26, Raymond O'Donnell r...@iol.ie wrote:
And also - does PERFORM works with FOUND?
Not sure what you mean - can you elaborate?
No, perform (and execute) doesn't populate 'found' variable:
On Jan 2, 2012, at 16:46, Ondrej Ivanič ondrej.iva...@gmail.com wrote:
Hi,
On 2 January 2012 03:26, Raymond O'Donnell r...@iol.ie wrote:
And also - does PERFORM works with FOUND?
Not sure what you mean - can you elaborate?
No, perform (and execute) doesn't populate 'found' variable:
Hi
2012/1/3 David Johnston pol...@yahoo.com:
On Jan 2, 2012, at 16:46, Ondrej Ivanič ondrej.iva...@gmail.com wrote:
Yes, PERFORM does populate FOUND.
From the documentation you just linked to
A PERFORM statement sets FOUND true if it produces (and discards) one or
more rows, false if
Hello Ray and others,
On Sat, Dec 31, 2011 at 10:26 AM, Raymond O'Donnell r...@iol.ie wrote:
# select pref_move_week('DE16290', 'DE1');
ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use PERFORM instead.
CONTEXT: PL/pgSQL function
On 01/01/2012 14:42, Alexander Farber wrote:
Hello Ray and others,
On Sat, Dec 31, 2011 at 10:26 AM, Raymond O'Donnell r...@iol.ie wrote:
# select pref_move_week('DE16290', 'DE1');
ERROR: query has no destination for result data
HINT: If you want to discard the results of a SELECT, use
On 31/12/2011 06:15, Alexander Farber wrote:
Hello again,
On Fri, Dec 30, 2011 at 2:07 PM, Alban Hertroys haram...@gmail.com wrote:
select 1 from pref_users where id=_from and vip current_timestamp +
interval '1 week';
if not found then
return;
end if;
unfortunately I get the
Hello again, please 1 more question:
can I have a SELECT statement inside of an IF-conditional?
The doc
http://www.postgresql.org/docs/8.4/static/plpgsql-control-structures.html
does not list such an example.
I'm asking, because I'd like to get rid of the has_vip
variable in my rewritten
On 29 Dec 2011, at 19:15, Alexander Farber wrote:
I'm trying to create PL/pgSQL procedure allowing
players with enough vip status left
to give a week of it to other users, as a gift:
create or replace function pref_move_week(_from varchar,
_to varchar) returns void as $BODY$
Awesome advices here.
Thank you and happy new year.
On Fri, Dec 30, 2011 at 2:07 PM, Alban Hertroys haram...@gmail.com wrote:
select 1 from pref_users where id=_from and vip current_timestamp +
interval '1 week';
if not found then
return;
end if;
found is a special pl/psql keyword
Hello again,
On Fri, Dec 30, 2011 at 2:07 PM, Alban Hertroys haram...@gmail.com wrote:
select 1 from pref_users where id=_from and vip current_timestamp +
interval '1 week';
if not found then
return;
end if;
unfortunately I get the error in PostgreSQL 8.4.9:
# select
Is it because my procedure is declared as void?
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hello fellow postgres users,
in my game using PostgreSQL 8.4.9 players can
purchase a VIP (very important person) status:
# \d pref_users;
Table public.pref_users
Column |Type | Modifiers
+-+---
Alexander Farber alexander.far...@gmail.com wrote:
Hello fellow postgres users,
in my game using PostgreSQL 8.4.9 players can
purchase a VIP (very important person) status:
# \d pref_users;
Table public.pref_users
Column |Type | Modifiers
Thank you Andreas - now that one case works ok,
On Thu, Dec 29, 2011 at 7:44 PM, Andreas Kretschmer
akretsch...@spamfence.net wrote:
Try if (not coalesce(has_vip, false)) then ...
but the other case not:
# create or replace function pref_move_week(_from varchar,
_to varchar)
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Alexander Farber
Sent: Thursday, December 29, 2011 3:01 PM
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Verifying a timestamp is null or in the past
Thank you
15 matches
Mail list logo