~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/test/regress/sql/sql_ascii.sql

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table computer_terms;
 
2
create table computer_terms(term text, category text, comments char(16));
 
3
create index computer_terms_index1 on computer_terms using btree(term);
 
4
create index computer_terms_index2 on computer_terms using btree(category);
 
5
insert into computer_terms values('computer display', 'X-A01-Y', 'a comment 1');
 
6
insert into computer_terms values('computer graphics', 'T-B01-Y', 'a comment 2');
 
7
insert into computer_terms values('computer programmer', 'S-Z01-Y', 'a comment 3');
 
8
vacuum computer_terms;
 
9
select * from computer_terms;
 
10
select * from computer_terms where category = 'X-A01-Y';
 
11
select * from computer_terms where category ~* 'x-a01-y';
 
12
select * from computer_terms where category like '_-A01-_';
 
13
select * from computer_terms where category like '_-A%';
 
14
select * from computer_terms where term ~ 'computer [dg]';
 
15
select * from computer_terms where term ~* 'computer [DG]';
 
16
select *,character_length(term) from computer_terms;
 
17
select *,octet_length(term) from computer_terms;
 
18
select *,position('s' in term) from computer_terms;
 
19
select *,substring(term from 10 for 4) from computer_terms;