Re: Function PostgreSQL 9.2

Поиск
Список
Период
Сортировка
От drum.lucas@gmail.com
Тема Re: Function PostgreSQL 9.2
Дата
Msg-id CAE_gQfVzrZ5BwBfo14PLJgJf-im3FPSZ0N0i3EbAZpVx9kja-A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Function PostgreSQL 9.2  (Adrian Klaver <adrian.klaver@aklaver.com>)
Ответы Re: Function PostgreSQL 9.2  (John R Pierce <pierce@hogranch.com>)
Re: Function PostgreSQL 9.2  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general


If I am following, this duplicates the information in companies.client_code_increment, in that they both return the last non-user code. Of course this assumes, as David mentioned, that the client is not using a numeric code system. Then you are left trying to figure whether a number is 'your' number or 'their' number?

 
The customer can add any value into users.code:

code CHARACTER VARYING,

But he also can let it blank/null if he wants to.
That's when the trigger do its job.. Put a value (starting in 1000) in that column.

Of course that has to be unique, as nobody can use the same value of others.


- I was hoping you cans could help me to start doing the function...

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Function PostgreSQL 9.2
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Function PostgreSQL 9.2