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

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.

主站蜘蛛池模板: 柏乡县| 宁德市| 平阳县| 乐至县| 昆明市| 宜君县| 黑龙江省| 岐山县| 昌江| 保康县| 邵阳市| 闽清县| 万盛区| 包头市| 枣阳市| 延津县| 越西县| 康平县| 宝坻区| 临沂市| 临海市| 特克斯县| 库伦旗| 蕉岭县| 林周县| 紫云| 桑植县| 松阳县| 鹿邑县| 鹤庆县| 咸宁市| 岑溪市| 灌阳县| 磐石市| 右玉县| 永昌县| 永善县| 洱源县| 忻州市| SHOW| 临汾市|