473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Composite Type Argument Construction to a Function

create type my_type (my_test text, my_int integer);

create function my_function(my_type)
returns timestamp as
'begin
return (current_timestamp);
end;
'
language 'plpgsql';
In 7.3.5, we are trying to get around the 32 argument limit of the
functions WITHOUT re-compiling with a greater func_max_args (due to
operational reasons).

My question is - HOW do I construct the argument to
my_function(my_type) so that the function recognises that I am passing
into it composite data?

NB: The example function is just "junque" to test passing a composite
type to a function.

TIA

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 23 '05 #1
1 1680
<ts*******@gmail.com> writes:
My question is - HOW do I construct the argument to
my_function(my_type) so that the function recognises that I am passing
into it composite data?


Sorry, don't think you're going to have much joy on that in 7.3.

In 8.0 you could do it with a ROW() constructor, but there's no such
thing in 7.3. IIRC the only way to pass a row value as a function
argument in 7.3 is to select the row from a table, viz

select my_function(t.*) from some_table t;

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bq | last post by:
Hello, This post is really two questions. Question 1: What is the current status on a revision of ISO C++, specifically regarding plans for overloading composite operators? Some people in this...
0
by: AshifToday | last post by:
this was my and my frineds little project in earlier classes, the program seperates the composite and prime numbers in two sections of the screen ===================== /* This program has...
3
by: martin | last post by:
Hi, I am attemping to write a composite control but have so far not achieved the results that I am looking for and would appreciate some advice. By a composite control, i mean, a Web User...
8
by: Ivan Sergio Borgonovo | last post by:
what's wrong with this? create type tSession as ( ty_found boolean, ty_Session char(32) ); create or replace function GetSessionID( integer ) returns tSession as ' declare thisSession...
14
by: dave.dolan | last post by:
Basically I'd like to implement the composite design pattern with leaves that are either of reference or value types, but even using generics I can't seem to avoid boxing (using ArrayList or...
18
by: AlexanderVX | last post by:
How do I write a constructor mehtod call in this case /*-----------*/ template<typename Tclass CObjectPoolImpl { public: void smth(T* pObj) { if (pObj)
0
by: Ralph | last post by:
I have a web page that dynamically loads user controls based on user selection. I store these in an an array. One of the pages has a custom control on it. It is a composite control. I have a few...
3
by: Eric | last post by:
I have created a fairly basic composite control consisting of a Label and a TextBox. In the overridden Render function, I'm creating a table with two rows and each row contains a cell (td). The...
1
by: subramanian100in | last post by:
consider template<typename TTest { // ... }; We can have a pointer type as argument to a template class. For example, we can have, int x = 100; Test<int*obj(&x); // assuming a suitable ctor...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.