Subject: Syntax error

From: Simon Connah <[email-masked]>
Date: Mon, 31 Oct 2022 01:11:25 +0000

Hi.

The SQL file and error can be found here:

https://gist.github.com/simonconnah/eddeed2661949c90f34ff91a3db3191b

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.

Thank you.

Simon.

---

From: Steve Baldwin <[email-masked]>
Date: Mon, 31 Oct 2022 12:17:14 +1100

> Not sure what you're trying to achieve with the (...) after the "RETURNS
ms_user" but you could just say "RETURNS muzikstrm_user" and get rid of the
(...) after it.

---

From: "David G. Johnston" <[email-masked]>
Date: Sun, 30 Oct 2022 18:30:04 -0700

> 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).

> 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.

---

From: Simon Connah <[email-masked]>
Date: Mon, 31 Oct 2022 01:49:47 +0000

------- Original Message -------
On Monday, October 31st, 2022 at 01:30, David G. Johnston <[email-masked]> wrote:

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

> 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).
> 

> 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.
> 

> David J.

My apologies. I won't use GitHub anymore. I just made an (incorrect) assumption that most people would find it easier to use.

Yes, I was playing around with it for a bit but got stuck and probably did something stupid.

Simon.

---

From: Bzzzz <[email-masked]>
Date: Mon, 31 Oct 2022 03:12:07 +0100

On Mon, 31 Oct 2022 01:49:47 +0000

> probably did something stupid.

The doc is your friend: more than 2,000 pages of it nowadays, covering
each and every corner of Pg - in Linux, you can install it as a package
and read it with your browser (/usr/share/doc/postgresql-doc-NN/html).

Jean-Yves

---

From: Simon Connah <[email-masked]>
Date: Mon, 31 Oct 2022 04:20:37 +0000

------- Original Message -------
On Monday, October 31st, 2022 at 02:12, Bzzzz <[email-masked]> wrote:

> Simon Connah [email-masked] wrote:
> 

> Jean-Yves

Thank you. I'll be sure to make better use of it in the future. I got a bit confused after reading a couple of examples online.

Simon.