Composite Types and Function Parameters

From: Greg <grigorey(at)yahoo(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Composite Types and Function Parameters
Date: 2010-10-25 15:56:56
Message-ID: 438246.84032.qm@web29703.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi guys, got across an interesting problem of passing params to a function in postgre: is it possible to pass a composite parameter to a function without declaring a type first?

For example:

// declare a function
create function TEST ( object??? )
   ....
   object???.paramName    // using parameter
   ....

// calling
perform TEST( ROW(string, int, bool, etc...) )

Or do I have to do the type declaration for that parameter?

Thanks!

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-10-25 15:57:45 Re: add label to enum syntax
Previous Message Andrew Dunstan 2010-10-25 15:48:57 add label to enum syntax