ERROR: function … does not exist and HINT: No function matches the given name and argument types

Your function has a couple of smallint parameters. But in the call, you are using numeric literals that are presumed to be type integer. A string literal or string constant (‘123’) is not typed immediately. It remains type “unknown” until assigned or cast explicitly. However, a numeric literal or numeric constant is typed immediately. The … Read more

Convert JSON to SQLite table

You have this python code: c.execute(“insert into medicoes values(?,?,?,?,?,?,?)” % keys) which I think should be c.execute(“insert into medicoes values (?,?,?,?,?,?,?)”, keys) since the % operator expects the string to its left to contain formatting codes. Now all you need to make this work is for keys to be a tuple (or list) containing the … Read more

How to show the trigger(s) associated with a view or a table in PostgreSQL?

This will return all the details you want to know select * from information_schema.triggers; or if you want to sort the results of a specific table then you can try SELECT event_object_table ,trigger_name ,event_manipulation ,action_statement ,action_timing FROM information_schema.triggers WHERE event_object_table=”tableName” — Your table name comes here ORDER BY event_object_table ,event_manipulation; the following will return table … Read more

Declare local variables in PostgreSQL?

Postgresql historically doesn’t support procedural code at the command level – only within functions. However, in Postgresql 9, support has been added to execute an inline code block that effectively supports something like this, although the syntax is perhaps a bit odd, and there are many restrictions compared to what you can do with SQL … Read more

How to do a FULL OUTER JOIN in SQLite?

Yes. See the Join (SQL) > Outer join > Full outer join article on Wikipedia. SELECT employee.*, department.* FROM employee LEFT JOIN department ON employee.DepartmentID = department.DepartmentID UNION ALL SELECT employee.*, department.* FROM department LEFT JOIN employee ON employee.DepartmentID = department.DepartmentID WHERE employee.DepartmentID IS NULL

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)