I\'ve a little problem with serial : From a file, I filled my database in which I have a client ID (it is a serial and it is my primary key). I have 300 clients so 300 client ID
if your Postgresql version is higher than the upper answer, you could try getting serial key with select pg_get_serial_sequence('ingredients', 'id');
select pg_get_serial_sequence('ingredients', 'id');
and SELECT adsrc FROM pg_attrdef WHERE adrelid = (SELECT oid FROM pg_class WHERE relname = 'ingredients');
SELECT adsrc FROM pg_attrdef WHERE adrelid = (SELECT oid FROM pg_class WHERE relname = 'ingredients');