Skip site navigation (1) Skip section navigation (2)

Re: Group Roles are now Login Roles in pgAdmin?

From: "Robert M(dot) Bernabe" <rbernabe(at)sandmansystems(dot)com>
To: "Robert Bernabe" <rbernabe(at)sandmansystems(dot)com>,"PostgreSQL List - Novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Group Roles are now Login Roles in pgAdmin?
Date: 2008-02-01 16:20:33
Message-ID: 004f01c864ee$61381ac0$6501a8c0@calhoun (view raw or flat)
Thread:
Lists: pgsql-novice
Sorry about the subject btw...also I've got this working already.  Thanks in 
advance and ahmm anyways.


----- Original Message ----- 
From: "Robert Bernabe" <rbernabe(at)sandmansystems(dot)com>
To: "PostgreSQL List - Novice" <pgsql-novice(at)postgresql(dot)org>
Sent: Friday, February 01, 2008 3:48 PM
Subject: Re: [NOVICE] Group Roles are now Login Roles in pgAdmin?


> Hi All,
>    Sorry I've done the google bit and scanned through the docs but I can't 
> seem to find how to do this...help please?
>
> I've got a function with parameters declared as
>
> create or replace function usf_myfxn(
> _in1 text,
> _in2 int,
> out _out1 int,
> out _out2 int,
> out _out3 int,
> out _out4 int)
>
> returns record
>
> as $$
>
> declare
>
> variables here....
>
> begin
>
> do stuff here...
>
> and more stuff ...
>
>
> return;
> end;
> $$ language 'plpgsql';
>
>
>
> Now I'm trying to test it out...
>
> so I created another function and using PGAdmin III
>
> create or replace function usf_myfxn_test()
> returns int
> as $$
>
> DECLARE
>
>
> _in1 text;
> _int2 int;
>
> _count int;
> _tmprecord record;
> begin
>
> -----------------------------------------------------------';
>
> _in1 := 'whatever';
> _in2 := 0;
>
> count := 0;
> for _tmprecord in select usf_myfxn(in1, in2) loop
>    count := count + 1;
>
> /*
> how do I access the data in _tmprecord? Since these are parameters within 
> a called function? I tried _tmprecord.in1 and it doesn't work...Help 
> please. Can anyone point me to a good book on plpgsql? We are quite heavy 
> on stored procedures in the current MS SQL based system and I'm 
> investigating porting the system over to PG. Thanks in advance!
>
> *?
>
>
> end loop;                return 1;
>
> END;
> $$ language 'plpgsql';
>
>
>
> select usf_myfxn_test();
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>               http://archives.postgresql.org 


In response to

pgsql-novice by date

Next:From: RaimonDate: 2008-02-02 15:13:20
Subject: Multiple rows into one row
Previous:From: Mike EllsworthDate: 2008-02-01 13:00:27
Subject: Passing on a q ... Alter schema

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group