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

Re: [INTERFACES] Re: [HACKERS] changes in 6.4

From: Hannu Krosing <hannu(at)trust(dot)ee>
To: Vadim Mikheev <vadim(at)krs(dot)ru>
Cc: pgsql-interfaces(at)postgreSQL(dot)org, hackers(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Date: 1998-07-16 08:30:11
Message-ID: 35ADBA13.753CDE3E@trust.ee (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackerspgsql-interfaces
Vadim Mikheev wrote:
> 
> Hannu Krosing wrote:
> >
> > Not requiring the column to sort on in target list ia also quite
> > important.
> 
> I'm not sure but isn't this already in 6.4-current ?
> 
> >
> > As are the (still elementary) constraints, still elementary becuse
> > there is no way to use functions or "is null" in check constraint,
> 
> ispas=> create table t (x int, check (x is null or x = 5));
> CREATE
> ispas=> insert into t values (1);
> ERROR:  ExecAppend: rejected due to CHECK constraint $1
> ispas=> insert into t values (null);
> INSERT 168212 1
> ispas=> insert into t values (5);
> INSERT 168213 1
> 
> And I'm sure that functions are supported too. This is 6.3.2

Sorry, i tried the wrong syntax (without IS ) ;(

but functions still dont work:

hannu=> create table test1 (a text, b text,
hannu-> check (trim(a) <> '' or trim(b) <> ''));
ERROR:  parser: parse error at or near "trim"

If I use a non-existing function, I get a different answer

hannu=> create table test1 (a text, b text,
hannu-> check (strip(a) <> '' or strip(b) <> ''));
ERROR:  function strip(text) does not exist

So it cant't be just "parser" error

> > and constraints can be used only when defining tables, not in
> > "alter table" construct.
> 
> I hadn't time to do this when implementing and have no plans
> to do this. In "near" future :)
> 
> >
> > > The days where every release fixed server crashes, or added a feature
> > > that users were 'screaming for' may be a thing of the past.
> >
> > Is anyone working on fixing the exploding optimisations for many OR-s,
> > at least the canonic case used by access?
> >
> > My impression is that this has fallen somewhere between
> > insightdist and Vadim.
> 
> I'm not working...

Are you after some general solution, or are you first implementing 
the 'rewrite to union' way ?

Hannu

In response to

Responses

pgsql-hackers by date

Next:From: Hannu KrosingDate: 1998-07-16 08:41:47
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: Park, Chul-SuDate: 1998-07-16 08:10:43
Subject: [BUG?] strange PQgetisnull

pgsql-interfaces by date

Next:From: Hannu KrosingDate: 1998-07-16 08:41:47
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: Maarten BoekholdDate: 1998-07-16 07:45:18
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

pgsql-general by date

Next:From: Hannu KrosingDate: 1998-07-16 08:41:47
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: Maarten BoekholdDate: 1998-07-16 07:45:18
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4

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