Can't work out what is wrong with this code - Mailing list pgsql-novice

From Simon Connah
Subject Can't work out what is wrong with this code
Date
Msg-id 5RtDKcDlGNlakqqw7RBiZueSkBmFuloOmz5p5L0twUfpsq1RHAYyLkhQTCdeuf-WiXRQPmHyiO4_jM-vlQUgQi-pZPrrx3DQeOZinLmd6s4=@protonmail.com
Whole thread Raw
List pgsql-novice
Hi,

I'm trying to return a row from a table and I'm having a tough time working out how to do it.

Here is my code:

https://gist.github.com/simonconnah/86f4a8ecb41f9ea3a4c759e5eba5c850

When I try and call the get_blog function in JavaScript I just get undefined which is not very helpful. Can someone
pointme in the right direction please? 

Simon.


Attachment

pgsql-novice by date:

Previous
From: Simon Connah
Date:
Subject: Re: Return a table from a function
Next
From: "Steve Tucknott (TuSol)"
Date:
Subject: Advice on foreign key and cascading delete design - postgresql 12.6