On Wed, Sep 23, 2009 at 06:12:13PM +0100, Simon Slavin wrote:
>
> On 23 Sep 2009, at 5:12pm, Nicolas Williams wrote:
>
> > On Tue, Sep 22, 2009 at 04:45:31PM -0400, D. Richard Hipp wrote:
> >> UPDATE t1 SET x=x; -- key line: Is this considered an "update"
> >> of t1.x?
> >
> > Igor
On 23 Sep 2009, at 5:12pm, Nicolas Williams wrote:
> On Tue, Sep 22, 2009 at 04:45:31PM -0400, D. Richard Hipp wrote:
>> UPDATE t1 SET x=x; -- key line: Is this considered an "update"
>> of t1.x?
>
> Igor pointed to the standards text, which I think is quite reasonable:
> an update is
On Tue, Sep 22, 2009 at 04:45:31PM -0400, D. Richard Hipp wrote:
> UPDATE t1 SET x=x; -- key line: Is this considered an "update"
> of t1.x?
Igor pointed to the standards text, which I think is quite reasonable:
an update is only an update if something changes.
The same should probably
On 22 Sep 2009, at 9:45pm, D. Richard Hipp wrote:
> The question is this: Should the no-op UPDATE statement (x=x) cause
> the ON UPDATE SET NULL foreign key constraint to set t2.y to NULL or
> not?
You would surely need agreement with the result of sqlite3_changes(),
right ?
CREATE TABLE
Hello
DRH The question is this: Should the no-op UPDATE statement (x=x) cause
DRH the ON UPDATE SET NULL foreign key constraint to set t2.y to NULL or
DRH not?
I think MySQL knows if a row gets actually updated. If the values in a row
don't change, then it says that no rows were updated.
I
D. Richard Hipp wrote:
> Consider the following SQL:
>
> CREATE TABLE t1(x integer);
> INSERT INTO t1 VALUES(123);
> CREATE TABLE t2(y integer REFERENCES t1 ON UPDATE SET NULL);
> INSERT INTO t2 VALUES(123);
>
> UPDATE t1 SET x=x; -- key line: Is this
On Tue, 22 Sep 2009, D. Richard Hipp wrote:
> The question is this: Should the no-op UPDATE statement (x=x) cause the
> ON UPDATE SET NULL foreign key constraint to set t2.y to NULL or not?
>
> PostgreSQL says "no" - the t2.y value is not nulled unless the t1.x
> value really does change values.
Consider the following SQL:
CREATE TABLE t1(x integer);
INSERT INTO t1 VALUES(123);
CREATE TABLE t2(y integer REFERENCES t1 ON UPDATE SET NULL);
INSERT INTO t2 VALUES(123);
UPDATE t1 SET x=x; -- key line: Is this considered an "update"
of t1.x?
SELECT * FROM
8 matches
Mail list logo