BUG #2984: Bug Creating or Updating a View

From: "Gabriel Bravo" <gbravo2k(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2984: Bug Creating or Updating a View
Date: 2007-02-09 17:27:45
Message-ID: 200702091727.l19HRjRg021682@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2984
Logged by: Gabriel Bravo
Email address: gbravo2k(at)yahoo(dot)com
PostgreSQL version: 8.1.5
Operating system: Windows XP Professional
Description: Bug Creating or Updating a View
Details:

I had a view created as:

CREATE OR REPLACE VIEW vensamblado AS
SELECT DISTINCT cuestionario.idcuestionario,
cuestionario.nombrecuestionario, riesgo.idriesgo, riesgo.nombreriesgo,
riesgo.resultado, pregunta.idpregunta, pregunta.nombrepregunta,
pregunta.tiporespuesta, pregunta.posicionrespuestas, pregunta.tipocontrol,
contenidocuestionario.ordenpregunta, opcion.idopcion, opcion.nombreopcion,
opcion.valor
FROM contenidocuestionario
JOIN cuestionario ON contenidocuestionario.idcuestionario =
cuestionario.idcuestionario
JOIN riesgo ON contenidocuestionario.idriesgo = riesgo.idriesgo
JOIN (pregunta
JOIN opcion ON pregunta.idpregunta = opcion.idpregunta) ON
contenidocuestionario.idpregunta = pregunta.idpregunta
ORDER BY cuestionario.idcuestionario, riesgo.idriesgo,
pregunta.idpregunta, contenidocuestionario.ordenpregunta,
opcion.nombreopcion, cuestionario.nombrecuestionario, riesgo.nombreriesgo,
riesgo.resultado, pregunta.nombrepregunta, pregunta.tiporespuesta,
pregunta.posicionrespuestas, pregunta.tipocontrol, opcion.idopcion,
opcion.valor;

I'm trying to replace that view because the ORDER clause is incorrect and I
want to change it. I'm changing with:

CREATE OR REPLACE VIEW vensamblado AS
SELECT DISTINCT cuestionario.idcuestionario,
cuestionario.nombrecuestionario, riesgo.idriesgo,
riesgo.nombreriesgo, riesgo.resultado, pregunta.idpregunta,
pregunta.nombrepregunta,
pregunta.tiporespuesta, pregunta.posicionrespuestas, pregunta.tipocontrol,
contenidocuestionario.ordenpregunta,
opcion.idopcion, opcion.nombreopcion, opcion.valor
FROM contenidocuestionario
JOIN cuestionario ON contenidocuestionario.idcuestionario =
cuestionario.idcuestionario
JOIN riesgo ON contenidocuestionario.idriesgo = riesgo.idriesgo
JOIN (pregunta
JOIN opcion ON pregunta.idpregunta = opcion.idpregunta) ON
contenidocuestionario.idpregunta = pregunta.idpregunta
ORDER BY cuestionario.idcuestionario, riesgo.idriesgo,
pregunta.idpregunta, contenidocuestionario.ordenpregunta,
opcion.nombreopcion;

And the view definition doesn't change !!!

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2007-02-09 18:00:09 Weird misinterpretation of EXECUTE in PL/pgSQL
Previous Message David Flater 2007-02-09 16:06:06 BUG #2983: Nonsense error: "Table has type interval, but query expects interval"