mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 14:41:22 +02:00
Add INSERT statement to example so that it can be reproduced
from John Gage
This commit is contained in:
parent
8af787ea24
commit
edff75bef8
@ -1,4 +1,4 @@
|
|||||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.149 2010/05/30 18:10:40 tgl Exp $ -->
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.150 2010/07/25 08:30:42 petere Exp $ -->
|
||||||
|
|
||||||
<sect1 id="xfunc">
|
<sect1 id="xfunc">
|
||||||
<title>User-Defined Functions</title>
|
<title>User-Defined Functions</title>
|
||||||
@ -293,6 +293,8 @@ CREATE TABLE emp (
|
|||||||
cubicle point
|
cubicle point
|
||||||
);
|
);
|
||||||
|
|
||||||
|
INSERT INTO emp VALUES ('Bill', 4200, 45, '(2,1)');
|
||||||
|
|
||||||
CREATE FUNCTION double_salary(emp) RETURNS numeric AS $$
|
CREATE FUNCTION double_salary(emp) RETURNS numeric AS $$
|
||||||
SELECT $1.salary * 2 AS salary;
|
SELECT $1.salary * 2 AS salary;
|
||||||
$$ LANGUAGE SQL;
|
$$ LANGUAGE SQL;
|
||||||
|
Loading…
Reference in New Issue
Block a user