Sebastian Ritter написа:
Hi all,
I have a question regarding functions. How can I return zero rows from a
function whose return type is a table row? I did the following test and it
did not work as expected:
[...]
CREATE OR REPLACE FUNCTION foobar(boolean) RETURNS SETOF x AS $_$
DECLARE
Hi all,
I have a question regarding functions. How can I return zero rows from a
function whose return type is a table row? I did the following test and it
did not work as expected:
CREATE OR REPLACE FUNCTION
fn_get_user (integer) RETURNS usertable AS '
DECLARE
in_userid A
Jim,
> Yes i'm aware this it is possible in 7.3 - can someone please confirm its
> not possible in 7.2 or provide me with an example of how to go about it.
It is sort of possible in 7.2, as a function can return a cursor to an
interface language capable of handling cursors. However, implementa
Josh Berkus wrote:
Tim,
That loop apparently does not find any matching rows, which would
have been inserted just before this row was, inside the same
transaction.
It was successfully finding those rows before, when the trigger was
AFTER INSERT. If I manually select those rows after the query
Tim,
> That loop apparently does not find any matching rows, which would
> have been inserted just before this row was, inside the same
> transaction.
>
> It was successfully finding those rows before, when the trigger was
> AFTER INSERT. If I manually select those rows after the query is
> commi
Ludwig Lim wrote:
Try changing the "AFTER" to "BEFORE"
CREATE TRIGGER projtask_insert_depend_trig BEFORE...
Changes made to the "NEW" will not be reflect in the
AFTER trigger since, the row is already inserted.
Thanks, however this seems to present a different problem now.
FOR depe
--- Tim Perdue <[EMAIL PROTECTED]> wrote:
> I have created a function in pl/pgsql to modify a
> row before it gets put
> into the database, but it seems my modification is
> being ignored, and
> the unmodified row is being inserted.
>
> I have confirmed with this RAISE EXCEPTION that my
> "NEW"
Tim Perdue <[EMAIL PROTECTED]> writes:
> I have created a function in pl/pgsql to modify a row before it gets put
^^^
> into the database, but it seems my modification is being ignored, and
> the unmodified row is being inserted.
> CREAT
I have created a function in pl/pgsql to modify a row before it gets put
into the database, but it seems my modification is being ignored, and
the unmodified row is being inserted.
I have confirmed with this RAISE EXCEPTION that my "NEW" row is modified
properly, however it is not being stored
Greetings,
I am new to pl/pgsqm (I did some SQL programming at school, now 8 years
ago so that part is rusty too ;-))
Anycase, I have a question concerning creating your own functions in
pl/pgsql.
This is my situation:
I have two tables:
- 'hosts': containing 'hostname' (primary key) and 'ip_a
hi,
i define a function using pgacces with pl/pgsql.
it seems that the queries define in the function wasn't executed.
if I try to excute the same queries from the psql everything, really, works
fine.
the body of the function is:
---
Declare
rec_struttura record;
11 matches
Mail list logo