pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff MacDonald <jeff@hub.org>
To: pgsql-sql@postgresql.org
Subject: substr
Date: Thu, 19 Oct 2000 10:19:10 -0300 (ADT)
Message-ID: <Pine.BSF.4.21.0010191017510.9479-100000@rage.hub.org> (raw)

i noticed that substr behaves a bit different in pgsql than perl

ie select foo from table where substr(foo,1,1) = 'X';

initially i thought it should be substr(foo,0,1) 

just wondering on the reasoning for this offset ?

Jeff MacDonald,

-----------------------------------------------------
PostgreSQL Inc		| Hub.Org Networking Services
jeff@pgsql.com		| jeff@hub.org
www.pgsql.com		| www.hub.org
1-902-542-0713		| 1-902-542-3657
-----------------------------------------------------
Facsimile : 1 902 542 5386
IRC Nick  : bignose




view thread (3+ messages)  latest in thread

Message-ID: <Pine.BSF.4.21.0010191017510.9479-100000@rage.hub.org>
Permalink:  ../Pine.BSF.4.21.0010191017510.9479-100000@rage.hub.org/
Also on:    postgresql.org/message-id/Pine.BSF.4.21.0010191017510.9479-100000@rage.hub.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: jeff@hub.org
  Subject: Re: substr
  In-Reply-To: <Pine.BSF.4.21.0010191017510.9479-100000@rage.hub.org>
  References: <Pine.BSF.4.21.0010191017510.9479-100000@rage.hub.org>

* 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