pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedupper() and lower() on varchar
3+ messages / 2 participants
[nested] [flat]
* upper() and lower() on varchar
@ 1998-09-01 10:04 Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>
1998-09-02 12:33 ` Re: [SQL] upper() and lower() on varchar Sferacarta Software <sferac@bo.nettuno.it>
0 siblings, 1 reply; 3+ messages in thread
From: Maarten Boekhold @ 1998-09-01 10:04 UTC (permalink / raw)
To: pgsql-sql
Hi,
Is there a way to get upper() and lower() to work on a varchar column? It
seems like these functions are only defined on the text datatype (in 6.3.2).
I guess what I need in this case is some way to convert varchar to text.
Will (text_in(varchar_out(column)) work?
Maarten
_____________________________________________________________________________
| TU Delft, The Netherlands, Faculty of Information Technology and Systems |
| Department of Electrical Engineering |
| Computer Architecture and Digital Technique section |
| M.Boekhold@et.tudelft.nl |
-----------------------------------------------------------------------------
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] upper() and lower() on varchar
1998-09-01 10:04 upper() and lower() on varchar Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>
@ 1998-09-02 12:33 ` Sferacarta Software <sferac@bo.nettuno.it>
1998-09-02 13:40 ` Re: [SQL] upper() and lower() on varchar Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>
0 siblings, 1 reply; 3+ messages in thread
From: Sferacarta Software @ 1998-09-02 12:33 UTC (permalink / raw)
To: pgsql-sql@postgresql.org, Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>; M.Boekhold@et.tudelft.nl
Hello Maarten,
martedì, 1 settembre 98, you wrote:
MB> Hi,
MB> Is there a way to get upper() and lower() to work on a varchar column? It
MB> seems like these functions are only defined on the text datatype (in 6.3.2).
MB> I guess what I need in this case is some way to convert varchar to text.
MB> Will (text_in(varchar_out(column)) work?
MB> Maarten
MB> _____________________________________________________________________________
MB> | TU Delft, The Netherlands, Faculty of Information Technology and Systems |
MB> | Department of Electrical Engineering |
MB> | Computer Architecture and Digital Technique section |
MB> | M.Boekhold@et.tudelft.nl |
MB> -----------------------------------------------------------------------------
It works for me (6.3.2)
take a look:
create table a(a varchar(10));
insert into a values ('AAA');
insert into a values ('aaa');
select * from tbl;
fld
---
aaa
AAA
(2 rows)
select * from tbl where upper(fld)='AAA';
fld
---
aaa
AAA
(2 rows)
Best regards,
Jose' mailto:sferac@bo.nettuno.it
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] upper() and lower() on varchar
1998-09-01 10:04 upper() and lower() on varchar Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>
1998-09-02 12:33 ` Re: [SQL] upper() and lower() on varchar Sferacarta Software <sferac@bo.nettuno.it>
@ 1998-09-02 13:40 ` Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>
0 siblings, 0 replies; 3+ messages in thread
From: Maarten Boekhold @ 1998-09-02 13:40 UTC (permalink / raw)
To: Sferacarta Software <sferac@bo.nettuno.it>; +Cc: pgsql-sql
On Wed, 2 Sep 1998, Sferacarta Software wrote:
> martedì, 1 settembre 98, you wrote:
>
> MB> Hi,
>
> MB> Is there a way to get upper() and lower() to work on a varchar column? It
> MB> seems like these functions are only defined on the text datatype (in 6.3.2).
>
> MB> I guess what I need in this case is some way to convert varchar to text.
> MB> Will (text_in(varchar_out(column)) work?
>
>
> It works for me (6.3.2)
> take a look:
>
> create table a(a varchar(10));
> insert into a values ('AAA');
> insert into a values ('aaa');
>
> select * from tbl;
> fld
> ---
> aaa
> AAA
> (2 rows)
>
> select * from tbl where upper(fld)='AAA';
> fld
> ---
> aaa
> AAA
> (2 rows)
I tried some stuff, and
select lower(aroms) from product where aroms='VAUGHAN STEVIE RAY'
works, but:
select * from product where lower(aroms)='vaughan stevie ray';
FATAL 1: palloc failure: memory exhausted
And:
rockhouse=> create index product_lower on product (lower(aroms));
ERROR: DefineIndex: (null) class not found
Anybody knows if I'm doing something wrong here? This is a 6.3.2 system
with all patches from ftp.postgresql.org applied, plus the patch for
enabling functional indices.
Maarten
_____________________________________________________________________________
| TU Delft, The Netherlands, Faculty of Information Technology and Systems |
| Department of Electrical Engineering |
| Computer Architecture and Digital Technique section |
| M.Boekhold@et.tudelft.nl |
-----------------------------------------------------------------------------
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1998-09-02 13:40 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-09-01 10:04 upper() and lower() on varchar Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>
1998-09-02 12:33 ` Sferacarta Software <sferac@bo.nettuno.it>
1998-09-02 13:40 ` Maarten Boekhold <maartenb@dutepp2.et.tudelft.nl>
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