ALTER TABLE ... SET DATA TYPE (SQL:2008)

Lists: pgsql-hackers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Michael Meskes <meskes(at)postgresql(dot)org>
Subject: ALTER TABLE ... SET DATA TYPE (SQL:2008)
Date: 2008-10-18 12:55:44
Message-ID: 48F9DCD0.1060508@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Here is a patch that allows the new SQL:2008 syntax (also used by IBM)

ALTER TABLE tab ALTER COLUMN col SET DATA TYPE typ

alongside our current syntax

ALTER TABLE tab ALTER COLUMN col TYPE typ

I verified that we implement a superset what the standard says. (Of
course, the standard doesn't suport the USING clause.)

There was some key word overlap with ecpg, so the patch looks bulkier
than it really is.

Attachment Content-Type Size
alter-set-data-type.diff text/plain 13.9 KB