Questions tagged as 'plpgsql'

2
answers

Operator in postgres function returns SQL Error [42883]: ERROR: operator does not exist: integer = integer []

I have the following error in a function    Postgres SQL Error [42883]: ERROR: operator does not exist: integer =   integer [] I have tried to convert the data to varchar and text but even then I could not return the require...
asked by 29.05.2017 / 21:37
0
answers

mysql accusing error when trying to insert a timestamp

I'm trying to pass a timestamp per parameter to a function, but I end up getting a ERROR: invalid input syntax for type time: "10" The section where I pass is: select agendar('2010-01-01 10:00:01') The snippet you receive is: CREATE...
asked by 14.03.2017 / 03:29
1
answer

postgres compare time extracted from a timestamp

I need to extract the hours and minutes of a timestamp in mysql, I tried to use maketime (); CREATE OR REPLACE FUNCTION agendar(dia timestamp) returns bool as $$ declare hora time := extract(hour from dia); minuto time := extract(minute from...
asked by 13.03.2017 / 03:16
1
answer

Return result of a select that is inside a loop

I'm trying for a few hours to get the result of a select that is inside a function in pgsql. I do not have much experience with sql. I researched a little but did not get much success. Here's my function for review: create or replace funct...
asked by 23.01.2017 / 14:03
1
answer

Automatic creation of SCHEMA in postgresql

I'm having a problem with the following, I need to create a trigger that when a given row is inserted it creates a SCHEMA with a specific structure! For example, in the public schema, I have the client table, and when I insert some client, I nee...
asked by 18.07.2016 / 14:23
1
answer

Cursor Trigger in book allocation

Well, I have a table called LOCALAOBOOK in it I have BOOK and CUSTOMER information when an insert or update of allocation occurs, so the customer_id, id_id, the output_data will be informed and from this date the delivery_date_date will be gener...
asked by 29.05.2016 / 20:51