plsql.diff
text/x-patch
Filename: plsql.diff
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: context
| File | + | − |
|---|---|---|
| doc/src/sgml/plsql.sgml | 23 | 0 |
*** doc/src/sgml/plsql.sgml 2002/05/03 04:11:07 2.58
--- doc/src/sgml/plsql.sgml 2002/05/30 10:38:56
***************
*** 371,376 ****
--- 371,379 ----
user_id INTEGER;
quantity NUMERIC(5);
url VARCHAR;
+ myrow tablename%ROWTYPE;
+ myfield tablename.fieldname%TYPE;
+ arow RECORD;
</programlisting>
</para>
***************
*** 448,453 ****
--- 451,465 ----
-- Some computations here
END;
' LANGUAGE 'plpgsql';
+
+
+ CREATE FUNCTION use_many_fields(tablename) RETURNS TEXT AS '
+ DECLARE
+ in_t ALIAS FOR $1;
+ BEGIN
+ RETURN in_t.f1 || in_t.f3 || in_t.f5 || in_t.f7;
+ END;
+ ' LANGUAGE 'plpgsql';
</programlisting>
</para>
</sect2>
***************
*** 491,496 ****
--- 503,519 ----
row could be from a view). The fields of the row type inherit the
table's field size or precision for data types such as
<type>char(n)</type>.
+ <programlisting>
+ CREATE FUNCTION use_two_tables(tablename) RETURNS TEXT AS '
+ DECLARE
+ in_t ALIAS FOR $1;
+ use_t table2name%ROWTYPE;
+ BEGIN
+ SELECT * INTO use_t FROM table2name WHERE ... ;
+ RETURN in_t.f1 || use_t.f3 || in_t.f5 || use_t.f7;
+ END;
+ ' LANGUAGE 'plpgsql';
+ </programlisting>
</para>
</sect2>