pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedDate type in pl/pgsql function checking passed parameter
2+ messages / 2 participants
[nested] [flat]
* Date type in pl/pgsql function checking passed parameter
@ 2005-10-24 13:02 Partners Majolee Infotech <info@majolee.info>
2005-10-24 14:11 ` Re: Date type in pl/pgsql function checking passed parameter John DeSoi <desoi@pgedit.com>
0 siblings, 1 reply; 2+ messages in thread
From: Partners Majolee Infotech @ 2005-10-24 13:02 UTC (permalink / raw)
To: pgsql-php
Hello All,
We have a pl/pgsql function functionName(date) .. here if it has been called using functionName('23456') it gives error .. we need to raise an exception(customized error message) if the passed value is not date.. how can we do that.
Thanks..
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Date type in pl/pgsql function checking passed parameter
2005-10-24 13:02 Date type in pl/pgsql function checking passed parameter Partners Majolee Infotech <info@majolee.info>
@ 2005-10-24 14:11 ` John DeSoi <desoi@pgedit.com>
0 siblings, 0 replies; 2+ messages in thread
From: John DeSoi @ 2005-10-24 14:11 UTC (permalink / raw)
To: Partners Majolee Infotech <info@majolee.info>; +Cc: pgsql-php
On Oct 24, 2005, at 9:02 AM, Partners Majolee Infotech wrote:
> We have a pl/pgsql function functionName(date) .. here if it has
> been called using functionName('23456') it gives error .. we need
> to raise an exception(customized error message) if the passed value
> is not date.. how can we do that.
You can add a function with the same name that accepts a text
parameter instead of a date. Then check the date and call your
functionName(date) function or raise your custom exception if the
date is invalid.
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-10-24 14:11 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-24 13:02 Date type in pl/pgsql function checking passed parameter Partners Majolee Infotech <info@majolee.info>
2005-10-24 14:11 ` John DeSoi <desoi@pgedit.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox