Re: Converting char to varchar automatically

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Melvin Davidson" <melvin6925(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Converting char to varchar automatically
Date: 2014-10-06 17:11:11
Message-ID: 5487F147B00848D69371EB3A4026DE35@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!
>SELECT 'ALTER TABLE ' || quote_ident(n.nspname) || '.' || quote_ident(c.relname)
> || ' ALTER COLUMN ' || quote_ident(a.attname) || ' TYPE varchar;'
> FROM pg_class c
> JOIN pg_namespace n ON n.oid = c.relnamespace
> JOIN pg_attribute a ON a.attrelid = c.oid
> JOIN pg_type t ON t.oid = a.atttypid
> WHERE t.typname = 'char'
> AND n.nspname <> 'pg_catalog';

It does not return any data.
Andrus.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andy Colson 2014-10-06 17:22:58 Re: How to get good performance for very large lists/sets?
Previous Message Igor Neyman 2014-10-06 16:54:50 Re: How to get good performance for very large lists/sets?