Обсуждение: Problem with 6.5 reload

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

Problem with 6.5 reload

От
AGRE Enterprises Limited
Дата:
I have just started to experiment with the new 6.5 beta.

When trying to reload the databases I got an error on what is a pretty
simple SQL command.

The pg_dump was from 6.3.1

I did psql < db.out

The error is

CREATE FUNCTION next_target ( )
   RETURNS int4 AS
   'update global set next_target=next_target+1;select next_target from global'
   LANGUAGE 'SQL';
ERROR:  parser: parse error at or near ""

I have tried repeating manually and get the same command.
The help would indicate the syntax is still correct.

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Glen Eustace, on behalf of
GodZone Internet Services, a division of AGRE Enterprises Limited
176 Te Awe Awe Street, Palmerston North, New Zealand
Ph: +64 6 356 2562, Fax: +64 6 357 0271
http://www.godzone.net.nz, EMail: agree@godzone.net.nz, ICQ: 10397208
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

RE: [GENERAL] Problem with 6.5 reload

От
Glen and Rosanne Eustace
Дата:
I have had no replies on this topic.

The SQL below was dumped from my 6.3.1 db and in 6.3.1 it works fine.
However the 6.5b1 psql complains that there is something wrong with the
syntax.

I have looked at \? create function, an it looks OK to me.

Can someone simply try it on another 6.5 installation to see if it fails
for you as well.

I am guessing with all the recent enhancements, the syntax has either
changed and the Docs haven't or the parser is broken.

> -----Original Message-----
CREATE FUNCTION next_target ( )
   RETURNS int4 AS
   'update global set next_target=next_target+1;select
next_target from global'
   LANGUAGE 'SQL';

ERROR:  parser: parse error at or near ""

Thanks.
--
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Glen Eustace, on behalf of
GodZone Internet Services, a division of AGRE Enterprises Limited.
176 Te Awe Awe St, Palmerston North, New Zealand
Ph: +64 6 356 2562, Fax: +64 6 357 0271, Mobile: 025 416 184,
http://WWW.GodZone.Net.NZ


RE: [GENERAL] Problem with 6.5 reload

От
"Brett W. McCoy"
Дата:
On Wed, 14 Apr 1999, Glen and Rosanne Eustace wrote:

> I have had no replies on this topic.
>
> The SQL below was dumped from my 6.3.1 db and in 6.3.1 it works fine.
> However the 6.5b1 psql complains that there is something wrong with the
> syntax.
>
> I have looked at \? create function, an it looks OK to me.
>
> Can someone simply try it on another 6.5 installation to see if it fails
> for you as well.
>
> I am guessing with all the recent enhancements, the syntax has either
> changed and the Docs haven't or the parser is broken.
>
> > -----Original Message-----
> CREATE FUNCTION next_target ( )
>    RETURNS int4 AS
>    'update global set next_target=next_target+1;select
> next_target from global'
                         ^
Do you need another ';' here?

>    LANGUAGE 'SQL';


Brett W. McCoy
                                         http://www.lan2wan.com/~bmccoy
-----------------------------------------------------------------------
Experience is what you get when you were expecting something else.


RE: [GENERAL] Problem with 6.5 reload

От
Glen and Rosanne Eustace
Дата:
> > CREATE FUNCTION next_target ( )
> >    RETURNS int4 AS
> >    'update global set next_target=next_target+1;select
> > next_target from global'
>                          ^
> Do you need another ';' here?
>
> >    LANGUAGE 'SQL';

Thanks Brett, you are correct.

It seems that prior to 6.5, this wasn't necessary but now is.

Glen.