public inbox for [email protected]
help / color / mirror / Atom feedSyntax error
6+ messages / 4 participants
[nested] [flat]
* Syntax error
@ 2022-10-31 01:11 Simon Connah <[email protected]>
2022-10-31 01:17 ` Re: Syntax error Steve Baldwin <[email protected]>
2022-10-31 01:30 ` Re: Syntax error David G. Johnston <[email protected]>
0 siblings, 2 replies; 6+ messages in thread
From: Simon Connah @ 2022-10-31 01:11 UTC (permalink / raw)
To: pgsql-novice <[email protected]>
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.
Attachments:
[application/pgp-signature] signature.asc (249B, ../../Q_H04Jq5Cwt5uLaj6yoBZatqznq8ArDL5BMPchLefhc9NQ7qEASdYdXXzIDdGUKPXFUJtyhy22gpeTq2jlZNVR0nVYNMocjJlLF55yidbqY=@protonmail.com/2-signature.asc)
download
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Syntax error
2022-10-31 01:11 Syntax error Simon Connah <[email protected]>
@ 2022-10-31 01:17 ` Steve Baldwin <[email protected]>
1 sibling, 0 replies; 6+ messages in thread
From: Steve Baldwin @ 2022-10-31 01:17 UTC (permalink / raw)
To: Simon Connah <[email protected]>; +Cc: pgsql-novice <[email protected]>
>
>
> The SQL file and error can be found here:
>
> https://gist.github.com/simonconnah/eddeed2661949c90f34ff91a3db3191b
>
> 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.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Syntax error
2022-10-31 01:11 Syntax error Simon Connah <[email protected]>
@ 2022-10-31 01:30 ` David G. Johnston <[email protected]>
2022-10-31 01:49 ` Re: Syntax error Simon Connah <[email protected]>
1 sibling, 1 reply; 6+ messages in thread
From: David G. Johnston @ 2022-10-31 01:30 UTC (permalink / raw)
To: Simon Connah <[email protected]>; +Cc: pgsql-novice <[email protected]>
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.
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Syntax error
2022-10-31 01:11 Syntax error Simon Connah <[email protected]>
2022-10-31 01:30 ` Re: Syntax error David G. Johnston <[email protected]>
@ 2022-10-31 01:49 ` Simon Connah <[email protected]>
2022-10-31 02:12 ` Re: Syntax error Bzzzz <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Simon Connah @ 2022-10-31 01:49 UTC (permalink / raw)
To: David G. Johnston <[email protected]>; +Cc: pgsql-novice <[email protected]>
------- Original Message -------
On Monday, October 31st, 2022 at 01:30, David G. Johnston <[email protected]> wrote:
> 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.
>
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.
Attachments:
[application/pgp-signature] signature.asc (249B, ../../Gi0Ga-IdqRfElHWAdHZH-l58OO8SPY4FgTXMmbMEH29B0FT46uLj8o6eLcn6r2MEAxb3OhzlfsW3bAz_OJ_XD5ZjF4B90aDiW39PMIQVXF8=@protonmail.com/3-signature.asc)
download
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Syntax error
2022-10-31 01:11 Syntax error Simon Connah <[email protected]>
2022-10-31 01:30 ` Re: Syntax error David G. Johnston <[email protected]>
2022-10-31 01:49 ` Re: Syntax error Simon Connah <[email protected]>
@ 2022-10-31 02:12 ` Bzzzz <[email protected]>
2022-10-31 04:20 ` Re: Syntax error Simon Connah <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Bzzzz @ 2022-10-31 02:12 UTC (permalink / raw)
To: [email protected]
On Mon, 31 Oct 2022 01:49:47 +0000
Simon Connah <[email protected]> wrote:
> Yes, I was playing around with it for a bit but got stuck and
> 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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Syntax error
2022-10-31 01:11 Syntax error Simon Connah <[email protected]>
2022-10-31 01:30 ` Re: Syntax error David G. Johnston <[email protected]>
2022-10-31 01:49 ` Re: Syntax error Simon Connah <[email protected]>
2022-10-31 02:12 ` Re: Syntax error Bzzzz <[email protected]>
@ 2022-10-31 04:20 ` Simon Connah <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Simon Connah @ 2022-10-31 04:20 UTC (permalink / raw)
To: Bzzzz <[email protected]>; +Cc: [email protected]
------- Original Message -------
On Monday, October 31st, 2022 at 02:12, Bzzzz <[email protected]> wrote:
>
>
> On Mon, 31 Oct 2022 01:49:47 +0000
> Simon Connah [email protected] wrote:
>
> > Yes, I was playing around with it for a bit but got stuck and
> > 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
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.
Attachments:
[application/pgp-signature] signature.asc (249B, ../../xGKXih_d8jvG_Kyzl78CZC9zh4RHuaeBFN5tt8ky2nm-QZRBJGRVGzSrJd7NwZQ9maGa5eCCWAHsKDQY6lEUalD9PO7dgmjZGKsIzFqcUSE=@protonmail.com/2-signature.asc)
download
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2022-10-31 04:20 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 01:11 Syntax error Simon Connah <[email protected]>
2022-10-31 01:17 ` Steve Baldwin <[email protected]>
2022-10-31 01:30 ` David G. Johnston <[email protected]>
2022-10-31 01:49 ` Simon Connah <[email protected]>
2022-10-31 02:12 ` Bzzzz <[email protected]>
2022-10-31 04:20 ` Simon Connah <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox