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
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 trying:
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=...
^
and
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
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 install it at
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
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 the
Alban Hertroys dal...@solfertje.student.utwente.nl 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