Skip site navigation (1) Skip section navigation (2)

Re: Deparsing DDL command strings

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Subject: Re: Deparsing DDL command strings
Date: 2012-10-05 14:13:47
Message-ID: 201210051613.48648.andres@2ndquadrant.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Friday, October 05, 2012 04:03:03 PM Tom Lane wrote:
> Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)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


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-10-05 14:24:55
Subject: Re: Deparsing DDL command strings
Previous:From: Tom LaneDate: 2012-10-05 14:03:03
Subject: Re: Deparsing DDL command strings

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group