Commit edff75be authored by Peter Eisentraut's avatar Peter Eisentraut

Add INSERT statement to example so that it can be reproduced

from John Gage
parent 8af787ea
<!-- $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 ( ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment