[pgsql-jp: 27363] Re: FreeBSD上のPostgreSQL では、position は予約語ですか?

Shindo@AtSystem shindo @ atsystem.jp
2002年 9月 7日 (土) 12:55:26 JST


進藤です。ありがとうございました。

いま、以下のように確認しました。
特定のバージョンでのみエラーが発生したので、調査不足でした。
パーサーのバージョンでこんなことも起こるのですね。
お付き合いいただいた、杉村 貴士 様、仲村 武 様、和田 様
ありがとうございました。

=======================================================================
% uname -a
FreeBSD xxx.yy.jp 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Mon Jan 28 14:31:5
6 GMT 2002     xx @ yy.zz.com:/usr/src/sys/compile/GENERIC  i386
% psql --version
psql (PostgreSQL) 7.1.2
contains readline, history, multibyte support
Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
Portions Copyright (c) 1996 Regents of the University of California
Read the file COPYRIGHT or use the command \copyright to see the
usage and distribution terms.
% createdb hoge
CREATE DATABASE
% psql hoge
Welcome to psql, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

hoge=# create table tb (position text);
ERROR:  parser: parse error at or near "position"
hoge=# create table tb ("position" text);
CREATE
hoge=# \dt tb
   List of relations
 Name | Type  | Owner
------+-------+--------
 tb   | table | shindo
(1 row)

hoge=#
=======================================================================

---- Snip Snip ----
>和田です。
>
>"Shindo @ AtSystem" wrote:
>
>> FreeBSD 4.5-RELEASE #0
>> psql (PostgreSQL) 7.1.2
>> 
>> この組み合わせで、
>> # create table tb (position text);
>> を実行すると
>> ERROR:  parser: parse error at or near "position"
>> とエラーが出ます。
>> 
>> 同じ7.1.2でも、Linux で実行するとエラーなしで、tbが作成されます。
>> FreeBSD上では position は予約語か何かなのでしょうか?
>
>手元にある7.1の日本語ドキュメントには、予約語だと書いてあります。
>7.2ではnon-reserved (cannot be function or type)になってますね。
---- Snip Snip ----

」」」」」」」」」」」」」」」」
」
」  進藤寿則@アットシステム
」  shindo@ atsystem.jp
」  shindo@ sasoh.ne.jp
」  Tel 022-385-1593
」  Fax 022-385-1595
」




pgsql-jp メーリングリストの案内