[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnumed-devel] When table column in postgres has been named 'group'
From: |
Busser, Jim |
Subject: |
[Gnumed-devel] When table column in postgres has been named 'group' |
Date: |
Sun, 13 Nov 2011 02:31:32 +0000 |
When I do in psql
\d+ cfg.v_cfg_options
I note
View "cfg.v_cfg_options"
Column | Type | Modifiers | Storage | Description
-----------------+---------+-----------+----------+-------------
option | text | | extended |
description | text | | extended |
owner | name | | plain |
workplace | text | | extended |
cookie | text | | extended |
type | text | | extended |
group | text | | extended |
pk_cfg_template | integer | | plain |
pk_cfg_item | integer | | plain |
View definition:
SELECT cfg_t.name AS option, cfg_t.description, cfg_i.owner, cfg_i.workplace,
cfg_i.cookie, cfg_t.type, cfg_t.cfg_group AS "group", cfg_t.pk AS
pk_cfg_template, cfg_i.pk AS pk_cfg_item
FROM cfg.cfg_template cfg_t, cfg.cfg_item cfg_i
WHERE cfg_i.fk_template = cfg_t.pk;
and I can do
select owner, workplace, option, cookie, type from cfg.v_cfg_options
order by owner, workplace, option;
and I can do
select * from …
but if I try to include the column named 'group' I get
gnumed_v16=> select group from cfg.v_cfg_options ;
ERROR: syntax error at or near "group"
LINE 1: select group from cfg.v_cfg_options ;
^
gnumed_v16=>
??
-- Jim
- [Gnumed-devel] When table column in postgres has been named 'group',
Busser, Jim <=