![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
F-Key Name Type Description "version" UNIQUE#1 id serial PRIMARY KEY package.version.id version integer NOT NULL package.binarypackage_name.id binarypackage_name integer UNIQUE#1 NO= T NULL |
|
What SQL command produced these results? |
#2
| |||
| |||
|
|
Hi PostgreSQL developers! Recently we got the bug report below. It seems that there is a special treatment of columns named "version". Normally fields of primary key indices are printed out unquoted, however, if the column is named "version", the name is printed out in quotes. This behaviour seems to confuse PostgreSQL autotoc. Does this behaviour serve any purpose or it is an error? |
#3
| |||
| |||
|
|
It doesn't appear to be necessary to quote the identifier, however version and "version" refer to the same identifier in this case so I wouldn't call it an error, either. My guess as to the reason comes from this comment fragment in quote_identifier: =20 * Check for keyword. This test is overly strong, since many of * the "keywords" known to the parser are usable as column names, * but the parser doesn't provide any easy way to test for whether * an identifier is safe or not... so be safe not sorry. |
#4
| |||
| |||
|
|
On 2004-07-08 7:10 -0700, Stephan Szabo wrote: It doesn't appear to be necessary to quote the identifier, however version and "version" refer to the same identifier in this case so I wouldn't call it an error, either. This makes sense, thank you. I reassigned this bug to postgresql-autodoc. Just ignoring the quotes cannot be that difficult... |
![]() |
| Thread Tools | |
| Display Modes | |
| |