Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2010-10-25 15:57:45
Subject: Re: add label to enum syntax
Previous:From: Andrew DunstanDate: 2010-10-25 15:48:57
Subject: add label to enum syntax

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group