Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006
    Posts
    14

    Unanswered: how to return a row (tuple) in functions

    Hi,
    I need to create a function that returns a tuple from a table. Can some one plz tell me what return type i should use.
    thnx

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    If you are returning a single tuple of an existing table,

    Create Function FunctionName() returns TableName

    If you want to return a set of records from an existing table,

    Create Function FunctionName() returns setof TableName


    Ref
    http://techdocs.postgresql.org/guide...rningFunctions
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    May 2006
    Posts
    14
    k..thnx i got it...

Posting Permissions

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