Questions tagged as 'plpgsql'

1
answer

PL / PGSQL - How to make the SP "comite" the data

Good afternoon, I have an SP (SP1) that invokes two other SP (SP2 and SP3). SP2 is invoked first from SP1, and updates a record in a table. SP3 is then invoked from SP1, and queries that same record, but returns the previous state as a result, t...
asked by 17.05.2017 / 18:33
1
answer

Exceptions in plpgsql

see, I have this code in plpgsql: CREATE OR REPLACE FUNCTION edatAlumne(int id_alumn) RETURNS int AS $$ DECLARE edat integer; BEGIN select extract(year from age(current_date, naixement)) into edat f...
asked by 22.03.2017 / 18:27
0
answers

Trigger between three tables

On the one hand, article table (code_of_bars, price_article), ticket (ticket_id, total_price) and finally the table that relates them formed (id_ticket, code_of_bars). I want that every time an entry is added in formed the price of the ticket is...
asked by 19.05.2018 / 11:24
0
answers

Return text in plpgsql?

I am doing an exercise for class in which they ask me the following:    Create a function that returns a text with a list of the notes of a   student indicated by parameter. The input parameter is mandatory.   You have to return null if the p...
asked by 29.03.2017 / 16:49