官术网_书友最值得收藏!

Chapter 4. Returning Structured Data

In the previous chapter, we saw functions that return single values. These functions return either a "scalar," simple type such as an integer, text, or data; or a more complex type, similar to a row in the database table. In this chapter, we will expand these concepts and show you how to return your data to the client in more powerful ways.

We will also examine the following topics:

  • Differences between SETOF scalars, rows, and arrays
  • Returning CURSORs, which are kind of "lazy" tables, that is, something that can be used to get a set of rows, but which may not have actually evaluated or fetched the rows yet, as the modern world is not about rigid table-structured data
  • Ways to deal with more complex data structures, both predefined and dynamically created

Let's start with a simple example and then add more features and variants as we go.

主站蜘蛛池模板: 达孜县| 贵港市| 句容市| 双牌县| 宜兰县| 雅江县| 富顺县| 灵川县| 栖霞市| 肥乡县| 普安县| 太仓市| 白水县| 虞城县| 定兴县| 高雄市| 荔浦县| 麦盖提县| 吉首市| 甘肃省| 望城县| 宜宾市| 万全县| 宁明县| 保山市| 义马市| 桐柏县| 蓬溪县| 务川| 泰安市| 龙口市| 西林县| 平阴县| 安阳市| 永安市| 广宗县| 乌海市| 皋兰县| 威远县| 永靖县| 凉城县|