sql insert function - Mailing list pgsql-general

From Chris Ochs
Subject sql insert function
Date
Msg-id 024701c3d96b$29c8cf20$250a8b0a@chris
Whole thread Raw
Responses Re: sql insert function
Re: sql insert function
Re: sql insert function
List pgsql-general
The documentation doesn't have any examples of using an sql language
function to do an insert, andI am at loss as to I am doing wrong here.
The error I get trying to create the function is:  ERROR:  syntax error at
or near "$1" at character 148

CREATE FUNCTION taxship(varchar,integer,varchar,float,float) returns integer
AS '
insert into taxship(s_oid,order_id,mer_id,tax,shipping) values
('$1',$2,'$3',$4,$5);
SELECT 1;
' LANGUAGE SQL;


pgsql-general by date:

Previous
From: Kragen Sitaker
Date:
Subject: Re: Protection From Inference (was Re: Drawbacks of using BYTEA for PK?)
Next
From: "Chris Ochs"
Date:
Subject: Re: sql insert function