In moving from 7.1.3 to 7.2devel (for bug fixes) we've encountered a
problem with a, previously valid, column name: time. In 7.1.3 the
following worked:

  CREATE TABLE test(time INTEGER);

while in 7.2devel it results in a parse error:

  ERROR:  parser: parse error at or near "time"

Looking at the source I see this is a result of 'time' being added to
ColLabel in backend/parser/gram.y earlier this month.

This effects interface code and database migration using pg_dump.

Obviously a new column name will have to be used, however is there a
definitive list of keywords to avoid so such an occurance wouldn't
happen in a production system? Currently these include:

  abort
  all
  analyse
  analyze
  and
  any
  asc
  between
  binary
  bit
  both
  case
  cast
  char
  character
  check
  cluster
  coalesce
  collate
  column
  constraint
  copy
  cross
  current_date
  current_time
  current_timestamp
  current_user
  dec
  decimal
  default
  deferrable
  desc
  distinct
  do
  else
  end
  except
  exists
  explain
  extract
  false
  float
  for
  foreign
  freeze
  from
  full
  global
  group
  having
  ilike
  initially
  in
  inner
  intersect
  into
  inout
  is
  isnull
  join
  leading
  left
  like
  limit
  listen
  load
  local
  lock
  move
  natural
  nchar
  new
  not
  notnull
  nullif
  null
  numeric
  off
  offset
  old
  on
  only
  or
  order
  out
  outer
  overlaps
  position
  precision
  primary
  public
  references
  reset
  right
  select
  session_user
  setof
  show
  some
  substring
  table
  then
  time
  timestamp
  to
  trailing
  transaction
  trim
  true
  union
  unique
  unknown
  user
  using
  vacuum
  varchar
  verbose
  when
  where

Best Regards, Lee Kindness..

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to