Bug 180407
Summary: | Numeric columns fail in WHERE clause when using tablename qualifier | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Stephen Cuppett <steve> |
Component: | postgresql | Assignee: | Tom Lane <tgl> |
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.0 | CC: | hhorak |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://pear.php.net/bugs/bug.php?id=6694 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-02-08 06:38:30 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Stephen Cuppett
2006-02-07 22:06:00 UTC
USER is a reserved word according to both the SQL standard and the Postgres grammar. You can use it as a column name only if you always surround it in double quotes. The fact that the 8.1 grammar lets you use it as the second name in a qualified identifier without quotes is a bit interesting, but it does not make 7.4's behavior a bug ... and in fact you'd be pretty foolish to assume that releases after 8.1 will still let you do that. (The example without the qualified name isn't doing what you think at all ... it's invoking the CURRENT_USER function.) Bottom line: choose a different name for your column, or get used to using double quotes. |