Skip to content

lab_13#24

Open
plidan123 wants to merge 2 commits intomainfrom
lab_13
Open

lab_13#24
plidan123 wants to merge 2 commits intomainfrom
lab_13

Conversation

@plidan123
Copy link
Owner

No description provided.

Copy link
Collaborator

@misshimichka misshimichka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Привет! Проверила ЛР13:

3/4, нужно поправить задание 4. Заодно советую проверить, что INSERT тоже работает.

select *
from schema1.job_history
where employee_id = 1;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. UPDATE работает, INSERT еще не проверяла, DELETE выдает ошибку:
padii_plyugin2=> delete from schema1.employees where employee_id = 1;
ERROR:  insert or update on table "job_history" violates foreign key constraint "fk_jh_emp"
DETAIL:  Key (employee_id)=(1) is not present in table "employees".
CONTEXT:  SQL statement "insert into schema1.job_history (
        employee_id, start_date, end_date,
        job_id, department_id, salary,
        location_id, type_operation
    )
    values (
        v_employee_id, v_start_date, v_end_date,
        v_job_id, v_department_id, v_salary,
        v_location_id, v_op
    )"
PL/pgSQL function schema1.employee_changes() line 67 at SQL statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants