Re: SQL Newbie Question

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: SQL Newbie Question
Дата
Msg-id 45B8D00C.9040804@cox.net
обсуждение исходный текст
Ответ на SQL Newbie Question  (Inoqulath <inoqulath@aol.de>)
Ответы Re: SQL Newbie Question  (btober@ct.metrocast.net)
Список pgsql-general
-----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-----

В списке pgsql-general по дате отправления:

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Subject: Postgres processes have a burst of CPU usage
Следующее
От: Thorsten Körner
Дата:
Сообщение: Problem with result ordering