Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6NEVQf83715 for ; Mon, 23 Jul 2001 10:31:26 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.4/8.11.4) id f6NERFk66362 for pgsql-sql@postgresql.org; Mon, 23 Jul 2001 10:27:15 -0400 (EDT) (envelope-from news) From: karl@tecc.co.uk (Karl Orbell) X-Newsgroups: comp.databases.postgresql.sql Subject: position(text,text) function Date: Mon, 23 Jul 2001 14:27:15 +0000 (UTC) Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 16 Message-ID: X-Complaints-To: scrappy@hub.org User-Agent: slrn/0.9.7.1 (Linux) To: pgsql-sql@postgresql.org X-Archive-Number: 200107/310 X-Sequence-Number: 4118 I'm having trouble using the position function, it's a simple built-in function. It returns the index of a substring within a main string. But, I just can't get it to work, it always gives this silly parser error. I've tried it in a variety of ways with variables instead of constants casting to text and using it in other contexts, (ie. in functions, not just in a select). What am I doing wrong? Is this not the correct syntax for a two argument function? test=# select position('hello','el'); ERROR: parser: parse error at or near "," Karl Orbell.