Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[NOVICE] numericOnly trigger

From: Derrick Betts <list(at)blueaxis.com>
Date: Fri Sep 21 2007 - 12:03:24 EDT


I was wondering if anyone has built a trigger or etc. that verifies the validity of an entry that is being posted to the database. I would like to do the following:

  1. Iterate through the column types in the table being updated
  2. If the column type is numeric or real, or etc.,
  3. remove all the strings from the New.value
  4. set the New.value to the newly stripped value
  5. Update the table with the modified values.

The part I was hoping not to have to reproduce, if anyone has it and is willing to share it, is the logic for iterating through the column types and cleaning the specific values for update.

Thanks,
Derrick

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

               http://www.postgresql.org/docs/faq Received on Fri Sep 21 12:14:05 2007

This archive was generated by hypermail 2.1.8 : Mon Oct 08 2007 - 17:49:41 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library