473,566 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Variadic functions in plpgsql?

Hi

I faintly remember that I once stumbled upon a way to declare variadic
functions (functions that take a variable number of arguments) in plpgsql -
but I just searched the docs and can't find any reference to variadic
functions.

So - please enlighten me - are there variadic functions in plpgsql, or are
there none?

greetings, Florian Pflug

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #1
2 2896
"Florian G. Pflug" <fg*@phlo.org > writes:
I faintly remember that I once stumbled upon a way to declare variadic
functions (functions that take a variable number of arguments) in plpgsql -
but I just searched the docs and can't find any reference to variadic
functions.


Nope. You can sort of kluge around this at the C level (by making
multiple pg_proc entries pointing at the same C function), but there's
no such capability in any PL language.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #2
"Florian G. Pflug" <fg*@phlo.org > writes:
I faintly remember that I once stumbled upon a way to declare variadic
functions (functions that take a variable number of arguments) in plpgsql -
but I just searched the docs and can't find any reference to variadic
functions.


Nope. You can sort of kluge around this at the C level (by making
multiple pg_proc entries pointing at the same C function), but there's
no such capability in any PL language.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #3

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

Similar topics

2
1878
by: Loony | last post by:
Hi, I want to use variadic functions with stl containers as arguments but I am not sure if that is possible and if so how. I'm using gcc 3.3 on Suse 8.2 Hope someone can help me. Thanx in advance
4
1377
by: Nigel J. Andrews | last post by:
I'm considering writing some functions in C. This is a collection of approximately 230 functions, mostly in plpgsql at the moment. Number of lines of plpgsql is approximately 6500 but that'll include all the blank lines used for spacing code as well as extra lines to allow nicer formating of things such as queries. The majority are also not...
89
6424
by: Sweety | last post by:
hi, Is main function address is 657. its show in all compiler. try it & say why? bye,
5
2156
by: Christopher Benson-Manica | last post by:
Do variadic functions (such as printf()) always scan the format string for format specifiers, even when there are no additional arguments? If it is instead a QoI issue, what would be true for a typical implementation? Basically, I'm wondering whether there is any advantage to using puts() instead of printf() for output of a string. --...
19
4230
by: Ross A. Finlayson | last post by:
Hi, I hope you can help me understand the varargs facility. Say I am programming in ISO C including stdarg.h and I declare a function as so: void log_printf(const char* logfilename, const char* formatter, ...); Then, I want to call it as so:
4
15806
by: anorakgirl | last post by:
hi, i'm writing some plpgsql functions which use a temporary table, and i've read the FAQ and am using EXECUTE to create and insert into my table to avoid errors caused by postgres caching the query plan. however, i can't work out how to get the data back out of my temporary table, as i don't think i can get the results of a select...
0
338
by: Florian G. Pflug | last post by:
Hi I faintly remember that I once stumbled upon a way to declare variadic functions (functions that take a variable number of arguments) in plpgsql - but I just searched the docs and can't find any reference to variadic functions. So - please enlighten me - are there variadic functions in plpgsql, or are there none?
9
3263
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this function are of type int. (My question has nothing to do with the definition of the function foo, so don't bother about it.) If I call the function...
4
4927
by: Boltar | last post by:
Hi I think I posted a question similar to this on here a while back but I can't find the thread and I need something more general anyway. My problem is I have 2 variadic functions , one of which needs to call the other passing its entire argument list but the other needs to be callable from anywhere else in the program as a variadic too,...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7951
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.