Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Databases - Practical PostgreSQL
Previous Page Home Next Page

Creating Functions

Creating functions within PgAccess is also fairly simple. First click on the Functions tab, then click New. You should now be presented with the Function window. Here, you may enter the name of your new function, the parameters it takes (comma-separated), the language it is written in (e.g., SQL , C , plpgsql , etc.), and the type of data it returns (if the function returns a value). Once you have defined those options, enter the body of the function in the white box that takes up most of the screen (or the location in the filesystem of the shared object file, if it is a C function). Once finished, click Save.

Note: You may view existing function definitions by selecting one from the function list, and clicking Open.

Figure 6-5 illustrates a simple example function, which selects the name of an author based on the id value in the authors table.

Figure 6-5. The Function dialog box

We will continue the discussion about creating functions in the next chapter.

Databases - Practical PostgreSQL
Previous Page Home Next Page

 
 
  Published under the terms of the Open Publication License Design by Interspire