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

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.

主站蜘蛛池模板: 高雄县| 清涧县| 罗江县| 峨眉山市| 永新县| 乐业县| 元江| 阿克陶县| 通河县| 巨野县| 岳阳市| 镇巴县| 游戏| 白河县| 白河县| 绥阳县| 西昌市| 女性| 孙吴县| 滦南县| 娱乐| 大姚县| 景谷| 赫章县| 修水县| 龙井市| 彩票| 玛纳斯县| 岳阳市| 通河县| 蒲城县| 闽清县| 北京市| 石柱| 万载县| 澄江县| 广西| 准格尔旗| 梓潼县| 聂荣县| 青海省|