Re: Question Regarding Procedural Function (store procedure)

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Question Regarding Procedural Function (store procedure)
Дата
Msg-id 20050217170346.GA24814@wolff.to
обсуждение исходный текст
Ответ на Question Regarding Procedural Function (store procedure)  (b t <qtboyzz@yahoo.com>)
Список pgsql-interfaces
On Wed, Feb 16, 2005 at 18:11:16 -0800, b t <qtboyzz@yahoo.com> wrote:
> Hi, first of all thanks for taking the time to read my message. I'm new to Sql and is very confuse of how to write a
proceduralfunction. I want to write a function that check if the data is aready in the table then it should not add to
thetable instead of linking it to the table. This is what I mean, I have a movies table and a stars table and a
stars_in_movies(this table keep track of the stars in what movies). So I'm suppose to write a store procedure that add
themovie to the database, if there is a star in the new movies then is already exist in the stars table then it should
linkthat star to the new movie.
 

You probably want to do this on the application side. While the screen
actors guild does things to keep actors names unique, they aren't always
used constistantly and occasionally change names. So a database procedure
is not in a good position to know whether or not an entry is new.
An application could do a check and provide information back to the person
entering the data and ask if the person is new. And then create a new entry
or modify an existing entry as desired.


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

Предыдущее
От: b t
Дата:
Сообщение: Question Regarding Procedural Function (store procedure)
Следующее
От: Michele Bendazzoli
Дата:
Сообщение: plpythonu strange syntax error