Skip site navigation (1) Skip section navigation (2)

(b)trim anomalies

From: Thomas F(dot)O'Connell <tfo(at)sitening(dot)com>
To: PgSql General <pgsql-general(at)postgresql(dot)org>
Subject: (b)trim anomalies
Date: 2004-10-29 18:21:02
Message-ID: 4A24E91C-29D7-11D9-BBBA-000D93AE0944@sitening.com (view raw or flat)
Thread:
Lists: pgsql-general
I was just wondering why the btrim syntax that takes only a single 
argument is not documented in 9.4 in the documentation (I checked both 
7.4 and 8.0 docs).

This is in a 7.4.5 installation:

pg=# \df btrim
                       List of functions
  Result data type |   Schema   | Name  | Argument data types
------------------+------------+-------+---------------------
  bytea            | pg_catalog | btrim | bytea, bytea
  text             | pg_catalog | btrim | text
  text             | pg_catalog | btrim | text, text
(3 rows)

Is it ever documented anywhere that the single-argument version of 
btrim can be used to remove whitespace from the left and right of a 
given string? Is this version not supposed to be user-facing for some 
reason?

Also, in this post:

http://archives.postgresql.org/pgsql-sql/2002-01/msg00053.php

Bruce sort of explains that TRIM is an ANSI word but doesn't fully 
explain why it doesn't show up in a \df listing:

pg=# \df trim
                    List of functions
  Result data type | Schema | Name | Argument data types
------------------+--------+------+---------------------
(0 rows)

This one's more a curiosity thing.

-tfo

--
Thomas F. O'Connell
Co-Founder, Information Architect
Sitening, LLC
http://www.sitening.com/
110 30th Avenue North, Suite 6
Nashville, TN 37203-6320
615-260-0005


Responses

pgsql-general by date

Next:From: Eric EDate: 2004-10-29 19:20:52
Subject: SELECT a value from various tables depending on a column value
Previous:From: Alvaro HerreraDate: 2004-10-29 18:14:14
Subject: Re: tasks

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group