Alban Hertroys writes:
> On 8 Nov 2010, at 16:18, Alexander Farber wrote:
>> alter table pref_users add constraint pref_users_medals_check check
>> (medals >= 0);
>>
>> has worked!
> To clarify a bit on this; if you add a constraint, you specify its name and
> what type of constraint it is, bef
On 8 Nov 2010, at 16:18, Alexander Farber wrote:
> Thank you,
>
> alter table pref_users add constraint pref_users_medals_check check
> (medals >= 0);
>
> has worked!
To clarify a bit on this; if you add a constraint, you specify its name and
what type of constraint it is, before specifying t
Oh right, I meant phpPgAdmin
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Le 08/11/2010 16:18, Alexander Farber a écrit :
> Thank you,
>
> alter table pref_users add constraint pref_users_medals_check check
> (medals >= 0);
>
> has worked!
>
> I do not use pgAdmin, because I see in the logs of my 2 web server,
> that attackers look for it all the time. But I'll instal
Thank you,
alter table pref_users add constraint pref_users_medals_check check
(medals >= 0);
has worked!
I do not use pgAdmin, because I see in the logs of my 2 web server,
that attackers look for it all the time. But I'll install it at my
development VM at home now.
Regards
Alex
--
Sent via
On 08/11/2010 14:50, Alexander Farber wrote:
alter table pref_users add constraint pref_users_medals_check (medals>= 0);
ERROR: syntax error at or near "("
LINE 1: ...pref_users add constraint pref_users_medals_check (medals>=...
^
a
Alexander Farber, 08.11.2010 15:50:
And then I realized that I actually want
medals smallint default 0 check (medals>= 0)
So I've dropped the old constraint with
alter table pref_users drop constraint "pref_users_medals_check";
but how can I add the new contraint please? I'm tryin
Hello,
I'm having this table filled with data:
\d pref_users;
Table "public.pref_users"
Column |Type | Modifiers
+-+---
id | character varying(32) | not null
first_name | character