[BUGS] BUG #5259: the table name double

2010-01-03 Thread David

The following bug has been logged online:

Bug reference:  5259
Logged by:  David
Email address:  goodom...@21cn.com
PostgreSQL version: 8.0
Operating system:   RHEL5
Description:the table name double
Details: 

hi 

  the table name double,why?

  Access privileges for database "gudumami"
 Schema |  Name   |   Type   |  
Access privileges   
+-+--+--
-
 public | ad_advert   | table| 
 public | ad_advert   | table| 
 public | ad_advice   | table| 
 public | ad_advice   | table| 
 public | ad_advice_id_seq| sequence | 
 public | ad_advice_id_seq| sequence | 
 public | ad_article  | table| 
 public | ad_article  | table| 
 public | ad_authority| table| 
 public | ad_authority| table| 
 public | ad_authority_rank_id_seq| sequence | 
 public | ad_authority_rank_id_seq| sequence | 
 public | ad_autolink | table| 
 public | ad_autolink | table|

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


[BUGS] BUG #5258: Unique and foreign key constraints fail on columns with reserved names, but not check constraints

2010-01-03 Thread Ben Woosley

The following bug has been logged online:

Bug reference:  5258
Logged by:  Ben Woosley
Email address:  ben.woos...@gmail.com
PostgreSQL version: 8.4.2
Operating system:   Mac OS 10.6
Description:Unique and foreign key constraints fail on columns with
reserved names, but not check constraints
Details: 

Check constraints successfully accept columns named with reserved words when
they are qualified by table using the . syntax, e.g. "check (mod(table.as,
2) = 0)"

However, unique and foreign key constraints added using the "alter table add
constraint" syntax fail on the column name.  At this point the statement has
enough information (the host table name) to properly identify the column
despite the unorthodox name.  Alternatively, you could allow the . syntax
qualification inside the argument to the constraint.

Now, you may say that this is a reserved word and should never be used, but
coming from the Ruby world, where reserved words are only reserved when
they're truly ambiguous, I very much appreciate the freedom of using these
names when it's unambiguous.  This particularly so given that keywords are
often chosen for their terseness and overlap with the most appropriate
column name.

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5259: the table name double

2010-01-03 Thread Craig Ringer

On 4/01/2010 2:26 PM, David wrote:


The following bug has been logged online:

Bug reference:  5259
Logged by:  David
Email address:  goodom...@21cn.com
PostgreSQL version: 8.0
Operating system:   RHEL5
Description:the table name double
Details:

hi

   the table name double,why?


How about some information?

Is this the output of psql's `\dp' command? If so, where are the actual 
privelege rows - did you delete them, or is the output you pasted 
actually EXACTLY what came out of psql?


What version of the ancient and approaching-retirement 8.0 are you 
using? "select pg_version()".


What's the output of this query:

  \o output.txt
  SELECT c.oid AS coid, n.oid AS noid, c.relname AS "Name", n.nspname 
AS "namespace" FROM pg_catalog.pg_class c LEFT OUTER JOIN 
pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN 
('r', 'v', 'S');

  \o

Please attach "output.txt" rather than copying and pasting, so that line 
wrapping is preserved.



--
Craig Ringer

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs