pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: arrays as pgsql function parameters
6+ messages / 3 participants
[nested] [flat]

* arrays as pgsql function parameters
@ 2002-06-07 23:57 Joseph Syjuco <joseph@asti.dost.gov.ph>
  2002-06-07 11:23 ` Re: arrays as pgsql function parameters Achilleus Mantzios <achill@matrix.gatewaynet.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Joseph Syjuco @ 2002-06-07 23:57 UTC (permalink / raw)
  To: pgsql-sql

how can i pass and access array parameters to a function



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: arrays as pgsql function parameters
  2002-06-07 23:57 arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
@ 2002-06-07 11:23 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2002-06-07 14:08   ` Re: arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
  0 siblings, 1 reply; 6+ messages in thread

From: Achilleus Mantzios @ 2002-06-07 11:23 UTC (permalink / raw)
  To: Joseph Syjuco <joseph@asti.dost.gov.ph>; +Cc: pgsql-sql

On Fri, 7 Jun 2002, Joseph Syjuco wrote:

Have a look at the documentation regarding server side programming.

Also you can have as examples the contrib/array and the famous
contrib/intarray package.

> how can i pass and access array parameters to a function
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 

-- 
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: arrays as pgsql function parameters
  2002-06-07 23:57 arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
  2002-06-07 11:23 ` Re: arrays as pgsql function parameters Achilleus Mantzios <achill@matrix.gatewaynet.com>
@ 2002-06-07 14:08   ` Joseph Syjuco <joseph@asti.dost.gov.ph>
  2002-06-07 13:33     ` Re: arrays as pgsql function parameters Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2002-06-07 15:53     ` Re: arrays as pgsql function parameters Josh Berkus <josh@agliodbs.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Joseph Syjuco @ 2002-06-07 14:08 UTC (permalink / raw)
  To: Achilleus Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-sql

actually i already have and basically the function statments start as
	create function test(_int4) returns integer
when i tried to execute the function 
	select test('{1,2,3,4}');
it didnt spew out errors but it didnt output results either

-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Achilleus Mantzios
Sent: Friday, June 07, 2002 7:24 PM
To: Joseph Syjuco
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] arrays as pgsql function parameters


On Fri, 7 Jun 2002, Joseph Syjuco wrote:

Have a look at the documentation regarding server side programming.

Also you can have as examples the contrib/array and the famous
contrib/intarray package.

> how can i pass and access array parameters to a function
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> 

-- 
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: arrays as pgsql function parameters
  2002-06-07 23:57 arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
  2002-06-07 11:23 ` Re: arrays as pgsql function parameters Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2002-06-07 14:08   ` Re: arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
@ 2002-06-07 13:33     ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Achilleus Mantzios @ 2002-06-07 13:33 UTC (permalink / raw)
  To: Joseph Syjuco <joseph@asti.dost.gov.ph>; +Cc: pgsql-sql

On Fri, 7 Jun 2002, Joseph Syjuco wrote:

> actually i already have and basically the function statments start as
> 	create function test(_int4) returns integer
> when i tried to execute the function 
> 	select test('{1,2,3,4}');
> it didnt spew out errors but it didnt output results either

Well, it depends on the code :)
Is it C? pg/plsql??

> 
> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Achilleus Mantzios
> Sent: Friday, June 07, 2002 7:24 PM
> To: Joseph Syjuco
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] arrays as pgsql function parameters
> 
> 
> On Fri, 7 Jun 2002, Joseph Syjuco wrote:
> 
> Have a look at the documentation regarding server side programming.
> 
> Also you can have as examples the contrib/array and the famous
> contrib/intarray package.
> 
> > how can i pass and access array parameters to a function
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> >     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
> > 
> 
> 

-- 
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
tel:    +30-10-8981112
fax:    +30-10-8981877
email:  achill@matrix.gatewaynet.com
        mantzios@softlab.ece.ntua.gr




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: arrays as pgsql function parameters
  2002-06-07 23:57 arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
  2002-06-07 11:23 ` Re: arrays as pgsql function parameters Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2002-06-07 14:08   ` Re: arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
@ 2002-06-07 15:53     ` Josh Berkus <josh@agliodbs.com>
  2002-06-10 13:51       ` Re: arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
  1 sibling, 1 reply; 6+ messages in thread

From: Josh Berkus @ 2002-06-07 15:53 UTC (permalink / raw)
  To: Joseph Syjuco <joseph@asti.dost.gov.ph>; Achilleus Mantzios <achill@matrix.gatewaynet.com>; +Cc: pgsql-sql

Joseph,

> actually i already have and basically the function statments start as
>  create function test(_int4) returns integer
> when i tried to execute the function 
>  select test('{1,2,3,4}');
> it didnt spew out errors but it didnt output results either

How about posting a full function definition?  

We're not telepathic.

-Josh



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: arrays as pgsql function parameters
  2002-06-07 23:57 arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
  2002-06-07 11:23 ` Re: arrays as pgsql function parameters Achilleus Mantzios <achill@matrix.gatewaynet.com>
  2002-06-07 14:08   ` Re: arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
  2002-06-07 15:53     ` Re: arrays as pgsql function parameters Josh Berkus <josh@agliodbs.com>
@ 2002-06-10 13:51       ` Joseph Syjuco <joseph@asti.dost.gov.ph>
  0 siblings, 0 replies; 6+ messages in thread

From: Joseph Syjuco @ 2002-06-10 13:51 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; +Cc: Achilleus Mantzios <achill@matrix.gatewaynet.com>; pgsql-sql

Josh Berkus wrote:
> 
> Joseph,
> 
> > actually i already have and basically the function statments start as
> >  create function test(_int4) returns integer
> > when i tried to execute the function
> >  select test('{1,2,3,4}');
> > it didnt spew out errors but it didnt output results either
> 
> How about posting a full function definition?
> 
> We're not telepathic.
> 
> -Josh

here is the sample function that i got from the internet.
hope you can send me a sample function

create function foo(_int4) returns int2 as'
    declare
    a _int4 alias for $1;
    i int:=1;
    begin
    while a[i] loop
    i:=i+1;
    end loop;
    return i-1;
    end;
    ' language 'plpgsql';



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2002-06-10 13:51 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-07 23:57 arrays as pgsql function parameters Joseph Syjuco <joseph@asti.dost.gov.ph>
2002-06-07 11:23 ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
2002-06-07 14:08   ` Joseph Syjuco <joseph@asti.dost.gov.ph>
2002-06-07 13:33     ` Achilleus Mantzios <achill@matrix.gatewaynet.com>
2002-06-07 15:53     ` Josh Berkus <josh@agliodbs.com>
2002-06-10 13:51       ` Joseph Syjuco <joseph@asti.dost.gov.ph>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox