Re: Deparsing DDL command strings - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Deparsing DDL command strings
Date
Msg-id 201210051613.48648.andres@2ndquadrant.com
Whole thread Raw
In response to Re: Deparsing DDL command strings  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Deparsing DDL command strings
List pgsql-hackers
On Friday, October 05, 2012 04:03:03 PM Tom Lane wrote:
> Dimitri Fontaine <dimitri@2ndQuadrant.fr> writes:
> > So I have a Node *parsetree containing some CHECK and DEFAULT raw
> > expressions to work with. Those can reference non existing tables,
> > either to-be-created or already-dropped. 
> 
> Why don't you just pass the original query string, instead of writing
> a mass of maintenance-requiring new code to reproduce it?
Its not easy to know which tables are referenced in e.g. an ALTER TABLE 
statement if the original statement didn't schema qualify everything.

Its also not really possible to trigger cascading effects like the creating of 
a sequence from a serial column that way...

Greetings,

Andres
-- 
Andres Freund        http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Deparsing DDL command strings
Next
From: Tom Lane
Date:
Subject: Re: Deparsing DDL command strings