Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008
    Posts
    1

    Question Unanswered: [v8.3] Syntax to call a function with an array of composites ?

    Hi all,

    I created a composite type :
    CREATE OR REPLACE FUNCTION wp.get_insert
    (
    fields wp._field
    )

    I created a function taking an array of composite parameter :
    CREATE OR REPLACE FUNCTION wp.get_insert
    (
    fields wp._field
    )
    RETURNS text AS
    $$
    begin
    ....
    end
    $$


    Now I want to call this function, but I did not find the right syntax.
    I tryied :
    select get_insert( {("test1", "test2"), ("test3", "test4")} )
    but if does not work, I always get a syntax error.

    Could somebody help me ? Thanks in advance for your reply.

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Hey look at that...they don't have sprocs

    http://www.postgresql.org/docs/8.3/i...-commands.html
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •