tag:blogger.com,1999:blog-479035033564585331.post522803359998160623..comments2023-09-17T01:12:41.284-07:00Comments on SELECT ... INTO: More elegant forms of returning records.David Keeneyhttp://www.blogger.com/profile/05853065350985701131noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-479035033564585331.post-20511227695537914452017-05-18T15:05:14.505-07:002017-05-18T15:05:14.505-07:00Rahasia Menang BandarQ
Cara Jitu BandarQ
Trik ...<a href="http://ow.ly/gs4030bQBBE" title="Rahasia Menang BandarQ" rel="nofollow"> Rahasia Menang BandarQ </a><br /><a href="http://ow.ly/gs4030bQBBE" title="Cara jitu BandarQ" rel="nofollow"> Cara Jitu BandarQ </a><br /><a href="http://ow.ly/gs4030bQBBE" title="Trik Hack BandarQ" rel="nofollow"> Trik Hack BandarQ </a><br /><a href="http://ow.ly/gs4030bQBBE" title="Tips BandarQ Online" rel="nofollow"> Tips BandarQ Online </a><br /><a href="http://ow.ly/gs4030bQBBE" title="Trik BandarQ Online" rel="nofollow"> Trik BandarQ Online </a><br /><br /><a href="http://ow.ly/gs4030bQBBE" title="Menang BandarQ Online" rel="nofollow"> Menang BandarQ Online </a><br /><a href="http://ow.ly/gs4030bQBBE" title="Cara Curang BandarQ" rel="nofollow"> Cara Curang BandarQ </a><br /><a href="http://ow.ly/gs4030bQBBE" title="Hack BandarQ Online" rel="nofollow"> Hack BandarQ Online </a><br /><a href="http://ow.ly/y4GY30bQBVd" title="info agen games online terbesar" rel="nofollow"> info agen games online terbesar </a><br /><a href="http://ow.ly/y4GY30bQBVd" title="Rahasia Menang Ceme" rel="nofollow"> Rahasia Menang Ceme </a><br /><br /><a href="http://ow.ly/y4GY30bQBVd" title="Agen Ceme Bandar Poker Samgong Online WSAMGONG" rel="nofollow"> Agen Ceme Bandar Poker Samgong Online WSAMGONG </a><br /><a href="http://ow.ly/y4GY30bQBVd" title="RGOSAKONG Agen Sakong Judi BandarQ Bandar Poker Online" rel="nofollow"> RGOSAKONG Agen Sakong Judi BandarQ Bandar Poker Online </a><br /><a href="http://ow.ly/y4GY30bQBVd" title="6dewa Agen Judi Sakong BandarQ Domino99 Capsa Susun Bandar Poker Indonesia" rel="nofollow"> 6dewa Agen Judi Sakong BandarQ Domino99 Capsa Susun Bandar Poker Indonesia </a><br /><a href="http://ow.ly/y4GY30bQBVd" title="Agen Sakong Judi Remi9 Bandar Poker Online Terpercaya QBANDAR" rel="nofollow"> Agen Sakong Judi Remi9 Bandar Poker Online Terpercaya QBANDAR </a><br /><a href="http://ow.ly/y4GY30bQBVd" title="VBANDAR Agen Remi9 Judi Sakong Bandar Poker Online Indonesia" rel="nofollow"> VBANDAR Agen Remi9 Judi Sakong Bandar Poker Online Indonesia </a>Anonymoushttps://www.blogger.com/profile/16405830735659609539noreply@blogger.comtag:blogger.com,1999:blog-479035033564585331.post-78841051774344869032016-06-14T09:23:42.772-07:002016-06-14T09:23:42.772-07:00100% DEPOSIT BONUS DAN BONUS REFERRAL 50% SEUMUR H...100% DEPOSIT BONUS DAN BONUS REFERRAL 50% SEUMUR HIDUP<br />BOSEN DENGAN POKER YANG ANDA MAIN TIDAK PERNAH WITHDRAW!!<br />SEGERA PINDAH KE WWW.BETDANWIN.COM POKER DENGAN MODAL DIKIT BISA MENANG RATUSAN JUTA<br />Minimal Deposit 10.000 Withdraw 20.000.<br />WWW.BETDANWIN.COM<br />JADILAH MEMBER AKTIF REFERRAL 50% SEUMUR HIDUP <br />KUNJUNGI DAN LIKE FANPAGE KAMI https://www.facebook.com/BetdanWin-1071580636209445/?ref=ts&fref=ts<br />Anonymoushttps://www.blogger.com/profile/03684911292354354259noreply@blogger.comtag:blogger.com,1999:blog-479035033564585331.post-18598224775771096902011-02-08T08:11:00.975-08:002011-02-08T08:11:00.975-08:00The "problem" with using types as output...The "problem" with using types as output definitions, is that it is not so easy to maintain the code later. <br /><br />As types are not extendable/alterable yet, it can be quite a headache to rewrite your stored procedure so, that it returns another field in the resulting type. With out parameters, you can just add a new out parameter and DROP/CREATE your function. With returning type, you have to drop function, then drop type, create your type and create function. The horror starts, when 2 functions are using the same type. So you have to drop all the type dependences first, to alter it, or create a new type, that will have probably some suffix with a number... so the amount of garbage that you will create in the database will be increasing with unclear dependencies... <br /><br />So my suggestion would be not to use result types.Anonymoushttps://www.blogger.com/profile/02521879454303479150noreply@blogger.comtag:blogger.com,1999:blog-479035033564585331.post-68759188996117243012011-02-01T20:20:12.443-08:002011-02-01T20:20:12.443-08:00JB:
Yes, they could be IMMUTABLE. I will edit tha...JB:<br />Yes, they could be IMMUTABLE. I will edit that into the post tomorrow.<br /><br />Theory:<br />I believe the RETURNS TABLE syntax entered PostgreSQL in 8.4; my test installation is still 8.3.<br /><br />Thanks to both of you.David Keeneyhttps://www.blogger.com/profile/05853065350985701131noreply@blogger.comtag:blogger.com,1999:blog-479035033564585331.post-88064271045045650792011-01-27T09:57:47.664-08:002011-01-27T09:57:47.664-08:00Even cleaner: use RETURNS TABLEand RETURN QUERY:
...Even cleaner: use RETURNS TABLEand RETURN QUERY:<br /><br />CREATE OR REPLACE FUNCTION squares(<br /> ct INT<br />) RETURNS TABLE (<br /> a int,<br /> b int<br />) LANGUAGE plpgsql AS $$<br />BEGIN<br /> RETURN QUERY SELECT i, POWER(i,2)::INT<br /> FROM generate_series(0, ct-1) AS i;<br />END;<br />$$;<br /><br />Of course, something this simple doesn't have to be written in PL/pgSQL; it can be just straight SQL:<br /><br />CREATE OR REPLACE FUNCTION squares(<br /> ct INT<br />) RETURNS TABLE (<br /> a int,<br /> b int<br />) LANGUAGE sql AS $$<br /> SELECT i, POWER(i,2)::INT<br /> FROM generate_series(0, $1-1) AS i;<br />$$;<br /><br />PS: OMG Blogger comment formatting is awful. No <code>! No <pre>!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-479035033564585331.post-50897080197878128632011-01-27T06:29:22.605-08:002011-01-27T06:29:22.605-08:00Couldn't those be defined as IMMUTABLE?Couldn't those be defined as IMMUTABLE?JPhttps://www.blogger.com/profile/14985302852355510033noreply@blogger.com