~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to contrib/btree_gin/sql/cidr.sql

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
set enable_seqscan=off;
 
2
 
 
3
CREATE TABLE test_cidr (
 
4
        i cidr
 
5
);
 
6
 
 
7
INSERT INTO test_cidr VALUES
 
8
        ( '1.2.3.4' ),
 
9
        ( '1.2.4.4' ),
 
10
        ( '1.2.5.4' ),
 
11
        ( '1.2.6.4' ),
 
12
        ( '1.2.7.4' ),
 
13
        ( '1.2.8.4' )
 
14
;
 
15
 
 
16
CREATE INDEX idx_cidr ON test_cidr USING gin (i);
 
17
 
 
18
SELECT * FROM test_cidr WHERE i<'1.2.6.4'::cidr ORDER BY i;
 
19
SELECT * FROM test_cidr WHERE i<='1.2.6.4'::cidr ORDER BY i;
 
20
SELECT * FROM test_cidr WHERE i='1.2.6.4'::cidr ORDER BY i;
 
21
SELECT * FROM test_cidr WHERE i>='1.2.6.4'::cidr ORDER BY i;
 
22
SELECT * FROM test_cidr WHERE i>'1.2.6.4'::cidr ORDER BY i;