CHECK ( NOT empty )
);
CREATE TABLE roles (
role_name TEXTNOT NULL
UNIQUE
CHECK ( NOT empty)
);
--
Caleb Cushing
http://xenoterracide.blogspot.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
. this code
as the opposite desired effect. it should be
SELECT $1 = ''; -- you have a double negative
--
Caleb Cushing
http://xenoterracide.blogspot.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
ary?) as
null. empty is not the only example (I'm sure), just the best I can
think of.
> p.s. Is it related to ANSI SQL?
not to my knowledge (can't say that it isn't though, I've never read
the standard).
--
Caleb Cushing
http://xenoterracide.blogspot.com
--
Sent via pgsql
);
this should allow us to do thinks like
CREATE TABLE users (
username TEXT NOT empty
);
the example from create domain (modified) is also pretty good
CREATE CONSTRAINT zip CHECK(
VALUE ~ '^\\d{5}$'
OR VALUE ~ '^\\d{5}-\\d{4}$'
);
--
Caleb Cushing
ht
should be
> moving in the direction of having the database engine take care of space
> optimizations, not having the user do it.
eh... not sure I agree on that 100%... but to some degree that's what
sql is for... at the same time that kinda sounds like sqlite's more
dynamic like t
ype and a boolean.
wasn't aware of that. I'm admittedly most familiar with sqlite,
postgres, and mysql
> Many databases
> support a TINYINT type as a single-byte value, although I'm not sure
> there's consistency on whether that's a signed or unsigned value.
uot;
which is not true, several projects I've worked on I've needed and
integer field that supports number within a small range 0-5 1-10 1-100
or something similar. I end up using smallint but it's range is huge
for the actual requirements.
--
Caleb Cushing
http://xenoterracide.