Return resultset from a function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neumann Péter

    #1

    Return resultset from a function

    Hi Every1,

    I'm fairly new to Postgres and ran into a problem quite soon. Until
    now I used MS Sql2000 and with it I was able to write a simple
    stored procedure that returned a resultset (for example: 'select *
    from table1'). But I don't know the way how to do it in Postgres,
    cause I can't define a function that returns a resultset. I know
    it's a lame question but I need some hints to solve this problem.

    Thanks in advance!
    Peter Neumann
    Hungary


    ---------------------------(end of broadcast)---------------------------
    TIP 4: Don't 'kill -9' the postmaster

  • Michael Fuhr

    #2
    Re: Return resultset from a function

    On Tue, Oct 12, 2004 at 04:15:28PM -0700, Neumann P?ter wrote:[color=blue]
    >
    > I'm fairly new to Postgres and ran into a problem quite soon. Until
    > now I used MS Sql2000 and with it I was able to write a simple
    > stored procedure that returned a resultset (for example: 'select *
    > from table1'). But I don't know the way how to do it in Postgres,
    > cause I can't define a function that returns a resultset. I know
    > it's a lame question but I need some hints to solve this problem.[/color]

    I think you're looking for a set-returning function. The following
    General Bits article has examples:



    --
    Michael Fuhr


    ---------------------------(end of broadcast)---------------------------
    TIP 1: subscribe and unsubscribe commands go to majordomo@postg resql.org

    Comment

    Working...