Open Source Development Tutorials | Newsletter Signup | About Us
Search  

Go Back   Open Source Tutorials Forum > Databases > PostgreSQL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-21-2004, 12:34 AM
pradeepkpj pradeepkpj is offline
Junior Member
 
Join Date: Jun 2004
Posts: 1 pradeepkpj is on a distinguished road
Question Function parameters - need help !!!

Hi all,

I am a new joinee to this group. We are using Postgresql for our project. We are trying to port few stored procedures from SQL to PGSQL. But I have problems in passing default values to function parameters. I have tried a lot of tutorials and books and none of them give a good insight into passing default values to arguments in a function in Postgresql. I am totally helpless.
I need ur help....I would really appreciate if anyone could help me out with this.

Thanks in advance....

With Best Regards,
Pradeep
Reply With Quote
  #2  
Old 06-21-2004, 04:55 PM
md_doc md_doc is offline
ubergeek
 
Join Date: Oct 2003
Posts: 204 md_doc has disabled reputation
Default

I am not sure I follow you 100% but if you want to use a default value can't you just check to see if it ISNULL and if it is set the value? Is that what you are looking for help on or is it something different. I can get you the code, I think, if that is what you are looking for.

Also others have suggested to check to see if the value is null and if it is null then you can use a different insert, assuming you are doing an insert, that would insert without that column and therefore using the default value of the table.

Let us know more of what you are looking for and I am sure we can be of help.
__________________
md
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -5. The time now is 11:09 PM.


Powered by: vBulletin Version 3.0.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright 2004 - 2006 GrindingGears.com. All Rights Reserved.