Re: data type change on a view

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: data type change on a view
Date: 2007-12-12 18:49:49
Message-ID: 20071212184949.GA22967@KanotixBox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> schrieb:

> On Dec 12, 2007 12:11 PM, A. Kretschmer
> <andreas(dot)kretschmer(at)schollglas(dot)com> wrote:
> > Hello @all,
> >
> > i have a question (rot really for myself, a member of ther german forum
> > asks):
> >
> > i have two tables, contains a varchar(N)-column. Now i create a VIEW
> > based on this tables. The resulting view contains now a varchar without
> > length. How can i prevent this? How can i force that the column in the
> > view contains the *exact* typ?
>
> cast it to varchar(8):

As i said in a private mail to Scott (sorry): the suggested way don't
work, at least with 8.1. Maybe this works better in more recent
versions.

But thx for the quick response.

Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknow)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anu Padki 2007-12-12 19:09:46 jdbc lob and postgresql
Previous Message Richard Huxton 2007-12-12 18:45:05 Re: Function to convert from TEXT to BYTEA?