Re: named generic constraints [feature request]

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Caleb Cushing <xenoterracide(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: named generic constraints [feature request]
Date: 2009-11-24 04:52:23
Message-ID: 162867790911232052j243f4c91hd72809ea59a6d266@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/11/24 Caleb Cushing <xenoterracide(at)gmail(dot)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
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message KaiGai Kohei 2009-11-24 06:12:43 Re: SE-PgSQL patch review
Previous Message Itagaki Takahiro 2009-11-24 04:27:03 Re: Partitioning option for COPY