El Lun 25 Jul 2005 23:29, Stephan Szabo escribió:
> >
> > Now to the constraint:
> >
> > I don't want the login and password columns to have nulls when the account
> > (row) is confirmed (confirmed column is set to true).
> >
> > I tried adding this CONSTRAINT to the table definition, but with no l
On Mon, Jul 25, 2005 at 08:28:32PM -0300, Martín Marqués wrote:
> I tried adding this CONSTRAINT to the table definition, but with no luck:
>
> CONSTRAINT nonuloconfirmado CHECK
> ((login NOT NULL AND password NOT NULL) OR NOT confirmado)
>
> It gives an error on the first NU
On Mon, 25 Jul 2005, [iso-8859-1] Martín Marqués wrote:
> I have a table with a login, password and confirmed columns (besides others),
> and I'm having so trouble getting this contraint to work.
>
> The account is created with login and password NULL and confirmed set to
> false. Once the user g
Sean Davis <[EMAIL PROTECTED]> writes:
> On Mar 22, 2005, at 7:26 AM, Szmutku Zoltán wrote:
>> I would like to: server ignore the bad statements (return false) and
>> after I call rollback or commit manuallypossible ?
> Within a transaction, if one statement fails, all changes will be
> roll
On Tue, Mar 22, 2005 at 07:41:50AM -0500, Sean Davis wrote:
>
> Within a transaction, if one statement fails, all changes will be
> rolled back. If you want to commit each statement that works, you can
> commit (or rollback) after each statement.
...or use savepoints (new in PostgreSQL 8.0).
On Mar 22, 2005, at 7:26 AM, Szmutku Zoltán wrote:
Hi everybody ,
I try using Postgre, but I have some problems.
I create a constraint ( R1>=0 ), and after connect to server from
VFP via ODBC .
In the client program I turn on the transactions . (
SQLSETPROP(nHandle,'Transactions',2) )
W
You probably didn't quite understand the suggestion. You should create a
unique index like:
create unique index your_index_name on your_table (companyID,
associationID) where ysnDefault;
This will restrict the uniqueness checks to the records where ysnDefault
is true (and not null, of course).
H
Greg Stark wrote:
Ron St-Pierre <[EMAIL PROTECTED]> writes:
This is not quite what I need. I need to create a constraint to allow only
-one- of
company<->association<->default(=true) value
but any number of
company<->association<->default(=false) values
So a unique index on "(compan
Ron St-Pierre <[EMAIL PROTECTED]> writes:
> No it doesn't. For example, after I create the unique index I can still input:
> company10 association7 true
> company10 association7 true
> company10 association7 true
> I want to prevent this from happening, but sti
On Tue, 4 Nov 2003, Ron St-Pierre wrote:
> Greg Stark wrote:
>
> >Ron St-Pierre <[EMAIL PROTECTED]> writes:
> >
> >
> >
> >>This is not quite what I need. I need to create a constraint to allow only
> >>-one- of
> >>company<->association<->default(=true) value
> >>but any number of
> >>com
Tom Lane wrote:
Ron St-Pierre <[EMAIL PROTECTED]> writes:
I just want to constrain the ysnDefault field to only allow one TRUE
value for any companyID/associationID pair, with no restrictions on the
number of FALSES.
You could do that with a partial unique index. There is an example
at the bo
Ron St-Pierre <[EMAIL PROTECTED]> writes:
> I just want to constrain the ysnDefault field to only allow one TRUE
> value for any companyID/associationID pair, with no restrictions on the
> number of FALSES.
You could do that with a partial unique index. There is an example
at the bottom of
http
12 matches
Mail list logo