From: Susan Hoddinott <susan@perth.dialix.com.au>
To: pgsql-sql@postgresql.org
Subject: Database function syntax for inserting records
Date: Tue, 4 Mar 2003 08:34:19 +0800
Message-ID: <000901c2e1e5$cd7ee100$1f84fea9@oemcomputer> (raw)
Hello,
I have created the following function:
CREATE OR REPLACE FUNCTION orderinsert(INTEGER, VARCHAR) RETURNS INTEGER AS '
INSERT INTO HEXORDERS ( CUSTOMER_ID, ORDER_KEY, DISTRIBUTOR_ID, ORDER_AMOUNT, ORDER_GST )
VALUES ( $1, $2, 1, 0, 0 ) ;
SELECT 1 ;
' LANGUAGE SQL ;
which seems to me to be consistent with the instructions given in the Reference manual. However, when trying to create this function I receive the errors:
parser: parse error at or near ";"
parser: parse error at or near "orderinsert"
Can any one tell my what I am doing wrong as this seems to be exactly as specified in the Reference and Programmer manuals?
Regards
Attachments:
Susan Hoddinott.vcf (application/octet-stream, 170B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: susan@perth.dialix.com.au
Subject: Re: Database function syntax for inserting records
In-Reply-To: <000901c2e1e5$cd7ee100$1f84fea9@oemcomputer>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox