473,509 Members | 2,890 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding Functionality

Hello,

i'm quite a newbie using postgres 7.2 so this may be an easy question, but how do i add new funtionality? I mean, i wanna add a couple of new functions, and i've found this files, pg_proc.h and fmgrtab.c, but i don't know the meaning of the fields, so i can't add anything.

For instance, in fmgrtab.c:

{ 61, "chareq", 2, true, false, chareq }

i know 61 is like the port or id for the function, "chareq" and chareq the name, but what about the 2, the true and the false? could be that 2 is the number of arguments?

And in pg_proc.h

DATA(insert OID = 61 ( chareq PGUID 12 f t t t 2 f 16 "18 18" 100 0 0 100 chareq - ))

what's the meaning of those f's?

Thank you very much!

http://webmail.wanadoo.es. Tu correo gratuito, rápido y en español
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 22 '05 #1
2 1317
That stuff defines the pg_proc table. Generally you use the CREATE FUNCTION
command to add functions. It takes care of all these details for you :)

\d pg_proc might give you some info.

On Wed, Feb 18, 2004 at 11:49:39AM -0500, Fernando Alonso Renault wrote:
Hello,

i'm quite a newbie using postgres 7.2 so this may be an easy question, but how do i add new funtionality? I mean, i wanna add a couple of new functions, and i've found this files, pg_proc.h and fmgrtab.c, but i don't know the meaning of the fields, so i can't add anything.

For instance, in fmgrtab.c:

{ 61, "chareq", 2, true, false, chareq }

i know 61 is like the port or id for the function, "chareq" and chareq the name, but what about the 2, the true and the false? could be that 2 is the number of arguments?

And in pg_proc.h

DATA(insert OID = 61 ( chareq PGUID 12 f t t t 2 f 16 "18 18" 100 0 0100 chareq - ))

what's the meaning of those f's?

Thank you very much!

http://webmail.wanadoo.es. Tu correo gratuito, rápido y en español
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly
--
Martijn van Oosterhout <kl*****@svana.org> http://svana.org/kleptog/ If the Catholic church can survive the printing press, science fiction
will certainly weather the advent of bookwarez.
http://craphound.com/ebooksneitherenorbooks.txt - Cory Doctorow


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAM6CMY5Twig3Ge+YRAmTXAKDe6O7276cf2I3REztQVI efedKAuQCggcnB
SOt/0xW1ulDqcYlPhPP5xgk=
=MvW4
-----END PGP SIGNATURE-----

Nov 22 '05 #2
Fernando Alonso Renault <pr*********@wanadoo.es> writes:
i'm quite a newbie using postgres 7.2 so this may be an easy question, but how do i add new funtionality? I mean, i wanna add a couple of new functions, and i've found this files, pg_proc.h and fmgrtab.c, but i don't know the meaning of the fields, so i can't add anything.


You probably should be thinking in terms of using CREATE FUNCTION rather
than hand-hacking the initial database contents. However, pg_proc
columns are documented at the top of pg_proc.h (not to mention in the
System Catalogs chapter of the developer documentation), and fmgrtab.c
is an automatically derived file that you shouldn't need to touch at all.

There is a good deal of documentation about writing new functions in the
HTML documentation, and lots of examples in the contrib/ tree. Note
that none of those examples rely on changing pg_proc.h ...

regards, tom lane

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

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

Nov 22 '05 #3

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

Similar topics

0
327
by: Kyo Guan | last post by:
How to Adding Functionality to a Class by metaclass(not by inherit) #example: import inspect class Foo(object): def f(self): pass
3
1106
by: info2knowledge | last post by:
I'd like to code things so that double-clicking an item will cause an event - preferably, one that will reference the item that was double clicked. For example, picture the following in the list...
0
708
by: Aryan2002 | last post by:
Hi There, I am working on a project where I have a standalone desktop application written in VC7. This app can also be embedded into other applications through the OCX control of this app. ...
28
1855
by: Ilias Lazaridis | last post by:
I understand that I can use __metaclass__ to create a class which modifies the behaviour of another class. How can I add this metaclass to *all* classes in the system? (In ruby I would alter...
0
770
by: jKnight908 | last post by:
Here's the scenerio: I have 1 textbox (TextBox1), a required field validator (Validator1), and a button (Button1). The Validator has EnableClientScript = true. Here's what I want. I want to set...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7344
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7069
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...
0
4730
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...
0
3216
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...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.