public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Simon Connah <[email protected]>
Cc: pgsql-novice <[email protected]>
Subject: Re: Syntax error
Date: Sun, 30 Oct 2022 18:30:04 -0700
Message-ID: <CAKFQuwZLZOewC2piOvYEhu5uprAQmE4sg5nOnsDW0jc3fuZJ_g@mail.gmail.com> (raw)
In-Reply-To: <Q_H04Jq5Cwt5uLaj6yoBZatqznq8ArDL5BMPchLefhc9NQ7qEASdYdXXzIDdGUKPXFUJtyhy22gpeTq2jlZNVR0nVYNMocjJlLF55yidbqY=@protonmail.com>
References: <Q_H04Jq5Cwt5uLaj6yoBZatqznq8ArDL5BMPchLefhc9NQ7qEASdYdXXzIDdGUKPXFUJtyhy22gpeTq2jlZNVR0nVYNMocjJlLF55yidbqY=@protonmail.com>

On Sun, Oct 30, 2022 at 6:11 PM Simon Connah <[email protected]>
wrote:

> Hi.
>
> The SQL file and error can be found here:
>
> https://gist.github.com/simonconnah/eddeed2661949c90f34ff91a3db3191b


For something that trivial just include it in the body of the email, don't
make people go out to a static foreign site to know what you are talking
about.  About the only good exception to this is a db-fiddle website where
you can actually execute the code being posted. (and you should still put
the main parts of the question in the email even then).


>
> I'm not sure why I'm getting the error message. It is something
> straightforward, but I'm stumped.
>
> If someone could point me in the right direction, I would appreciate it.
>
>
You invented some create function syntax the system has no clue what to do
with.  There are only two mutually exclusive options for RETURNS, "rettype"
or the word "TABLE" then a table specification.  You seem to somehow wish
to combine them, dropping the word TABLE.

https://www.postgresql.org/docs/current/sql-createfunction.html

David J.


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Syntax error
  In-Reply-To: <CAKFQuwZLZOewC2piOvYEhu5uprAQmE4sg5nOnsDW0jc3fuZJ_g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox