Sql select like question.

From: "hatuan" <hatuan05(at)gmail(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Sql select like question.
Date: 2005-05-25 15:28:00
Message-ID: 000501c5613e$592794c0$0201a8c0@server
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I use domain in my database
Ex
CREATE DOMAIN ud_id
AS bpchar(3)
DEFAULT ''::bpchar
NOT NULL;

And have table A

CREATE TABLE A
(
id ud_ma_nt NOT NULL,
name ud_name,
CONSTRAINT A_pkey PRIMARY KEY (id)
)

I have a select query Select * from A where id like 'US%'
In pgAdmin i have error : "ERROR: unsupported type: 136452". But if select
is : Select * from A where id like 'US%'::ud_id, query work well.
So can I use first query in postgre? I don't want to use second query
because i don't know columns 's domain but i know it is char(xx).
Thank in advance. Sorry for my English.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message .. 2005-05-25 15:45:25 Обучение: Взыскание убытков и защита от взыскания.
Previous Message Tom Lane 2005-05-25 13:58:31 Re: Permissions + Views + Functions = relation not exist when not owner