pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedSql select like question.
5+ messages / 2 participants
[nested] [flat]
* Sql select like question.
@ 2005-05-25 15:28 hatuan <hatuan05@gmail.com>
2005-05-25 21:19 ` Re: Sql select like question. Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: hatuan @ 2005-05-25 15:28 UTC (permalink / raw)
To: 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.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Sql select like question.
2005-05-25 15:28 Sql select like question. hatuan <hatuan05@gmail.com>
@ 2005-05-25 21:19 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-05-26 11:50 ` Re: Sql select like question. hatuan <hatuan05@gmail.com>
2005-05-26 15:49 ` Re: Sql select like question. hatuan <hatuan05@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Tom Lane @ 2005-05-25 21:19 UTC (permalink / raw)
To: hatuan <hatuan05@gmail.com>; +Cc: pgsql-sql
"hatuan" <hatuan05@gmail.com> writes:
> I have a select query Select * from A where id like 'US%'
> In pgAdmin i have error : "ERROR: unsupported type: 136452".
What PG version is this?
There were some bugs of that ilk in 8.0..8.0.2, but I think they
are all fixed in 8.0.3. Leastwise your example doesn't fail for
me ...
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Sql select like question.
2005-05-25 15:28 Sql select like question. hatuan <hatuan05@gmail.com>
2005-05-25 21:19 ` Re: Sql select like question. Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-05-26 11:50 ` hatuan <hatuan05@gmail.com>
2005-05-26 14:51 ` Re: Sql select like question. Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 5+ messages in thread
From: hatuan @ 2005-05-26 11:50 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
My version is "PostgreSQL 8.0.3 on i686-pc-mingw32, compiled by GCC gcc.exe
(GCC) 3.4.2 (mingw-special)"
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "hatuan" <hatuan05@gmail.com>
Cc: <pgsql-sql@postgresql.org>
Sent: Thursday, May 26, 2005 4:19 AM
Subject: Re: [SQL] Sql select like question.
> "hatuan" <hatuan05@gmail.com> writes:
> > I have a select query Select * from A where id like 'US%'
> > In pgAdmin i have error : "ERROR: unsupported type: 136452".
>
> What PG version is this?
>
> There were some bugs of that ilk in 8.0..8.0.2, but I think they
> are all fixed in 8.0.3. Leastwise your example doesn't fail for
> me ...
>
> regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Sql select like question.
2005-05-25 15:28 Sql select like question. hatuan <hatuan05@gmail.com>
2005-05-25 21:19 ` Re: Sql select like question. Tom Lane <tgl@sss.pgh.pa.us>
2005-05-26 11:50 ` Re: Sql select like question. hatuan <hatuan05@gmail.com>
@ 2005-05-26 14:51 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 5+ messages in thread
From: Tom Lane @ 2005-05-26 14:51 UTC (permalink / raw)
To: hatuan <hatuan05@gmail.com>; +Cc: pgsql-sql
"hatuan" <hatuan05@gmail.com> writes:
> My version is "PostgreSQL 8.0.3 on i686-pc-mingw32, compiled by GCC gcc.exe
> (GCC) 3.4.2 (mingw-special)"
Well, if it's 8.0.3 then you've found a new variant of the problem, but
we cannot fix it without a complete test case. Please read the bug
reporting guidelines:
http://www.postgresql.org/docs/8.0/static/bug-reporting.html
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Sql select like question.
2005-05-25 15:28 Sql select like question. hatuan <hatuan05@gmail.com>
2005-05-25 21:19 ` Re: Sql select like question. Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-05-26 15:49 ` hatuan <hatuan05@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: hatuan @ 2005-05-26 15:49 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
I have fixed it. I have pg8.03 but database is 8.0. I dump database and
reload it, it work well.
Thank for your help.
----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "hatuan" <hatuan05@gmail.com>
Cc: <pgsql-sql@postgresql.org>
Sent: Thursday, May 26, 2005 4:19 AM
Subject: Re: [SQL] Sql select like question.
> "hatuan" <hatuan05@gmail.com> writes:
> > I have a select query Select * from A where id like 'US%'
> > In pgAdmin i have error : "ERROR: unsupported type: 136452".
>
> What PG version is this?
>
> There were some bugs of that ilk in 8.0..8.0.2, but I think they
> are all fixed in 8.0.3. Leastwise your example doesn't fail for
> me ...
>
> regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2005-05-26 15:49 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-25 15:28 Sql select like question. hatuan <hatuan05@gmail.com>
2005-05-25 21:19 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-05-26 11:50 ` hatuan <hatuan05@gmail.com>
2005-05-26 14:51 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-05-26 15:49 ` hatuan <hatuan05@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox