PostgreSQL ALTER TABLE has a very nifty ALTER COLUMN USING expression syntax, that allow flexible column conversion.

We should use that in DatabaseSchema_pgsql::changeField() instead of the hackish "rename the old field to _old, copy the data over, drop the old field" method that we are currently using.

Comments

damien tournoud’s picture

Version: 7.x-dev » 8.x-dev
Category: bug » task

Thinking about this more, it seems that ALTER COLUMN only supports a subset of what we need. The current solution is more robust. Let's reconsider this for Drupal 8.

jhedstrom’s picture

Component: postgresql database » ajax system
Issue summary: View changes
Parent issue: » #2157455: [Meta] Make Drupal 8 work with PostgreSQL or remove support from core before release
bzrudi71’s picture

Issue tags: +PostgreSQL
nod_’s picture

how is that ajax?

bzrudi71’s picture

Component: ajax system » postgresql db driver

This has for sure nothing to do with ajax ;-)

bzrudi71’s picture

I don't see much room for improvements here. Using expression syntax is very limited (as already stated in #1) and some things changed meanwhile. Leaving this open for discussion and will close this if we have not other feedback in a couple of days...

bzrudi71’s picture

Status: Active » Closed (won't fix)

Let's close this one now :)