Writing a Postgresql Stored Procedure Returning a Single Value

Say we have a table called person with the following structure --------------------------- column| datatype --------------------------- _id | autonumber name | text age | integer --------------------------- We want to write a stored procedure to return the highest age that we have in the table. We will use OUT param here. CREATE OR REPLACE FUNCTION get_max_age(OUT max_age int) RETURNS int LANGUAGE 'plpgsql' AS $BODY$ BEGIN SELECT MAX(age) INTO max_age FROM person; END $BODY$; That’s it.

Writing a Postgresql Stored Procedure Returning Resultset

Coming from Microsoft SQL Server, I keep on forgetting how to return a resultset from a stored procedure in postgresql. Here is a small sample of how to do it. Needs a bit more code than SQL Server. Note that postgresql does not have stored procedure, they have function. They are equivalent. Say we have a table called person with the following structure --------------------------- column| datatype --------------------------- _id | autonumber name | text age | integer --------------------------- We want to write a stored procedure to return records with age greater than a specified age.

Login Flow in Flutter

In this article, I will be showing a simple flutter app that will demonstrate a typical mobile login flow. This article is not an introductory tutorial on flutter or programming. I am assuming that the reader knows programming and has basic understanding of how flutter works. You can find more from flutter.io. Suggested readings Flutter for Beginners: An introductory guide to building cross-platform mobile applications with Flutter and Dart 2

Chrome is the new IE 6

I am getting increasingly frustrated with chrome. Or should I say developers. It seems the developers never bother to test their apps in anything other than chrome now. Granted that chrome has 65% of the marketshare, but developers must and should build for standards but it seems they are building only for chrome. But how did they get to here? Yes, by pesking users to download chrome whenever users get to one of google’s properties.