Обсуждение: possible bug in CREATE FUNCTION

Поиск
Список
Период
Сортировка

possible bug in CREATE FUNCTION

От
Michel Decima
Дата:
hello everybody,

  I was trying playing with the CREATE FUNCTION statement in psql when I made
  a copy/paste mistake : the function body was empty. The error message was
  strange:

guanabara:~> psql
Password:
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

decimami=# CREATE FUNCTION foo() RETURNS text AS ' ' LANGUAGE 'SQL' ;
pqReadData() -- backend closed the channel unexpectedly.
        This probably means the backend terminated abnormally
        before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!#


  Is this a feature ? An error message like 'function body empty' wouldn't be
  better ?

 MD.