Ayuda con Check

From: Marco Aurelio Sotelo Figueroa <masotelof(at)yahoo(dot)com(dot)mx>
To: Ayuda Postgres <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Ayuda con Check
Date: 2005-04-27 19:17:03
Message-ID: 426FE52F.8090407@yahoo.com.mx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Hola compañero, tengo una pregunta, resulta ser que tengo la siguiente tabla

create table cliente (

id_cliente integer not null,

nombre varchar (30) not null ,

direccion varchar (20) not null ,

colonia varchar (20) not null ,

cp char (5) not null ,

telefono varchar (10),

fax varchar (20),

rfc char (14) not null,

curp char (18),

tipo tipos,

status estados,

ciudad integer not null,

constraint pk_cliente primary key (id_cliente),

constraint chk_cliente_rfc check (rfc like '[A-Z][A-Z][A-Z][A-Z][0-9][0-9][0-9][0-9][0-9][0-9][A-Z][A-Z][0-9]' or rfc like '[A-Z][A-Z][A-Z][0-9][0-9][0-9][0-9][0-9][0-9][A-Z][A-Z][0-9]'),

constraint chk_cliente_curp check (curp like '[A-Z][A-Z][A-Z][A-Z][0-9][0-9][0-9][0-9][0-9][0-9][H,M][A-Z][A-Z][A-Z][A-Z][A-Z][0-9][0-9]'),

constraint fk_cliente_ciudad foreign key (ciudad) references ciudad (id_ciudad));

y ahi tengo una serie de Checks, el problema que tengo es que no funciona, me manda el mensaje 'ERROR: new row for relation "cliente" violates check constraint "chk_cliente_rfc"'.

Ese chek lo tengo en SQL Server y jala bien. Alguien sabe que puede estar pasando.

Uso Windows 2000 Server con PostgreSQL 8.0.2

--


The Skull Leader

La Capacidad, Responsabilidad, Etica y Profesionalismo no son comparables ni tienen relacion con la vestimenta y apariencia del ser humano, TODOS SOMO IGUALES.

Attachment Content-Type Size
masotelof.vcf text/x-vcard 200 bytes

Responses

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Jaime Casanova 2005-04-27 19:30:09 Re: numeric vs real
Previous Message mmiranda 2005-04-27 19:13:52 RE: numeric vs real