Search Postgresql Archives

Using CHECK while CREATE'ing table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

 I am new to postgreSQL and have a working experience with SQLite.
 While i am creating a table, i want to use constraints or more so -
use checks to see that

1. the email address is valid [a basic check with no bells and
whistles is good enuf for me].
2. On a separate column entry, i would also want to check that the
string is a valid hex string i.e no characters other than [0-9 and (A-
F or a-f)] are present.

What is the simplest and most efficient way to achieve this without
having to re-invent the wheel.

Should i trigger actions during "insert" process or should i use
constraints/checks during "create" process??

TIA

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux