Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by hub.org (8.10.1/8.11.0) with ESMTP id e9JEoFn76548 for ; Thu, 19 Oct 2000 10:50:15 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id e9JEoD509051; Thu, 19 Oct 2000 10:50:13 -0400 (EDT) To: Jeff MacDonald cc: pgsql-sql@postgresql.org Subject: Re: substr In-reply-to: References: Comments: In-reply-to Jeff MacDonald message dated "Thu, 19 Oct 2000 10:19:10 -0300" Date: Thu, 19 Oct 2000 10:50:12 -0400 Message-ID: <9048.971967012@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200010/176 X-Sequence-Number: 1838 Jeff MacDonald writes: > i noticed that substr behaves a bit different in pgsql than perl > ie select foo from table where substr(foo,1,1) = 'X'; > just wondering on the reasoning for this offset ? Larry Wall and the SQL92 authors didn't talk to each other... We are implementing SQL around here, not Perl, so we have to follow the SQL spec's definition of substr(). regards, tom lane