Here are a couple ways:
-- Referencing the sequence directly:
CREATE SEQUENCE test_seq;
SELECT 'AAAA'||nextval('test_seq')::TEXT;
?column?
----------
AAAA1
SELECT 'AAAA'||nextval('test_seq')::TEXT;
?column?
----------
AAAA2
-- Using a DEFAULT
CREATE TABLE abc
(val TEXT NOT NULL DEFAULT 'AAAA'||nextval('test_seq'::regclass)::TEXT,
foo TEXT);
INSERT INTO abc (foo) VALUES ('qewr');
SELECT * FROM abc;
val | foo
-------+------
AAAA3 | qewr
These assume that you have carefully decided how to proceed, based on the comments to your original question, as asked by the others.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…