KEYEXISTS function

Поиск
Список
Период
Сортировка
От April L
Тема KEYEXISTS function
Дата
Msg-id 3.0.5.32.20020704104620.02d0f008@mail.i-netco.com
обсуждение исходный текст
Ответы Re: KEYEXISTS function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
In an old DOS database program I programmed in for years, there was a handy
function called

KEYEXISTS("value",index)

value of course was only in quotes if it was a string.

I'm imagining this could be pretty easily created as a function for
postgres, and I'm wondering if someone has already done this?

The recent discussion here on the Novice list sparked my memory of how very
often a KEYEXISTS type of function is useful. I know in my own work, an
attempt to insert a record where the primary key would be duplicated,
results in an error to the user, so I have to error trap and cannot "try to
insert and do something else if insert doesn't work" - I have to look for
the existence of a conflicting record and not insert if there is one.

Thank you,

- April



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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: best match question: please help
Следующее
От: "caroline kenny"
Дата:
Сообщение: Carraige Return issue