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

[pgAdmin III] #191: Functions returning TABLE lose necessary double quotes for names

From: "pgAdmin Trac" <trac(at)code(dot)pgadmin(dot)org>
To:
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: [pgAdmin III] #191: Functions returning TABLE lose necessary double quotes for names
Date: 2010-05-19 21:14:34
Message-ID: 045.3868a0c3460d94cef803e4c6076e5d8b@code.pgadmin.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
#191: Functions returning TABLE lose necessary double quotes for names
---------------------+------------------------------------------------------
 Reporter:  brsa     |       Owner:  dpage 
     Type:  bug      |      Status:  new   
 Priority:  minor    |   Milestone:  1.10.4
Component:  pgadmin  |     Version:        
 Keywords:           |    Platform:  all   
---------------------+------------------------------------------------------
 Yet another hickup in the reverse engineering of functions returning
 TABLE(): necessary double quotes for field names are lost. The resulting
 SQL DDL is not valid.

 Demo:
 ~~~~~
 -- I say:
 CREATE FUNCTION foo()
   RETURNS TABLE("my id" integer, "soMe TeXt" text) AS  -- note the quotes!
 $$
 SELECT 1, 'two'::text
 $$
   LANGUAGE sql;

 -- pgAdmin says:
 CREATE OR REPLACE FUNCTION foo()
   RETURNS TABLE(my id integer, soMe TeXt text) AS
 $BODY$
 SELECT 1, 'two'::text
 $BODY$
   LANGUAGE 'sql' VOLATILE
   COST 100
   ROWS 1000;
 ALTER FUNCTION foo() OWNER TO postgres;

-- 
Ticket URL: <http://code.pgadmin.org/trac/ticket/191>
pgAdmin III <http://code.pgadmin.org/trac/>
pgAdmin III

Responses

pgadmin-hackers by date

Next:From: Erwin BrandstetterDate: 2010-05-19 21:31:51
Subject: Reverse engineering of functions ..
Previous:From: pgAdmin TracDate: 2010-05-19 19:41:06
Subject: [pgAdmin III] #190: Add an option to Copy so that it all copies the header

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