Default Value in Table Setup Help

Поиск
Список
Период
Сортировка
Hello all,

I am working on setting up a table that will append a sequence to the end
of the value inserted.
Example;
INSERT INTO test (test) VALUES ('abcd');
And have the data in the database be;
abcd0001

Now I do have things setup else where were the default value for the field
is such:
default ('abcd'::text || lpad(text(nextval('test_sequence'::text)), 4,
'0'::text))

But i want the "abcd" or what erver to be added in the insert?

What am I missing to make this happen?



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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Why lower's not accept an AS declaration ?
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Hour difference?