0

I have two columns in specific table in Postgres. When new row is inserted, I want to know how to automatically insert data in two column enter image description here

So if I have a table insert table_name( nombre) values ('xxxxxx'). I want that creation_date(current day) and creation_user(current user in database) also inserted in the table.

Thanks for your help.

Best,

1 Answer 1

0

if I understand your question correctly, that solves

"creation_date" timestamp not null default CURRENT_TIMESTAMP

see this question: here.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks Kopper how Can do the same to the creation_user?
I think we can use current_user from postgress... Thanks a lot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.