Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

numericOnly trigger



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.,
       a. remove all the strings from the New.value
       b. set the New.value to the newly stripped value
    3.    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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group