2009/11/24 Caleb Cushing <xenoterrac...@gmail.com>:
>> CREATE OR REPLACE FUNCTION emptystr(text)
>> RETURNS bool AS $$
>>  SELECT $1 <> ''; -- it is SQL not C
>> $$ LANGUAGE sql;
>>
>> CREATE TABLE users(
>>  username TEXT CHECK (NOT emptystr(username)),
>
> although I'm not going to continue discussing the request. this code
> as the opposite desired effect. it should be
>
> SELECT $1 = ''; -- you have a double negative

no -

"--" is line comment in SQL - it same like "//" in C++

Regards
Pavel Stehule

>
> --
> 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

Reply via email to