Search Postgresql Archives

Re: SQL Newbie Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/25/07 09:30, Inoqulath wrote:
> Hello Folks
> 
> Have a look at this Table:
> 
> CREATE TABLE foo(
> id serial,
> a_name text,
> CONSTRAINT un_name UNIQUE (a_name));
> 
> Obviously, inserting a string twice results in an error (as one would
> expect). But: is there any known possibility to ingnore an errorneous
> INSERT like SQLite's "conflict algorithm" (SQLite:"INSERT OR
> [IGNORE|ABORT] INTO foo [...]")?
> I tried to use a trigger before INSERT takes place, but it seems that
> before firing a trigger the constraints are checked...
> Background: I'd like to INSERT a few thousand lines in one transaction,
> where some values will be appear twice.

No.

  Unique \U*nique"\, a. [F. unique; cf. It. unico; from L. unicus,
     from unus one. See {One}.]
     Being without a like or equal; unmatched; unequaled;
     unparalleled; single in kind or excellence; sole. --
     {U*nique"ly}, adv. -- {U*nique"ness}, n.
     [1913 Webster]


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFuNAMS9HxQb37XmcRAh4XAJ99ebAGyuHTFc9+bLiuW5ewPJkIYgCgguLP
1UDAUlXSGnZrKQb4Czoqp5w=
=Wm9P
-----END PGP SIGNATURE-----


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux