Thread

  1. Syntax error

    Simon Connah <simon.n.connah@protonmail.com> — 2022-10-31T01:11:25Z

    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.
  2. Re: Syntax error

    Steve Baldwin <steve.baldwin@gmail.com> — 2022-10-31T01:17:14Z

    >
    >
    > 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.
    
  3. Re: Syntax error

    David G. Johnston <david.g.johnston@gmail.com> — 2022-10-31T01:30:04Z

    On Sun, Oct 30, 2022 at 6:11 PM Simon Connah <simon.n.connah@protonmail.com>
    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.
    
  4. Re: Syntax error

    Simon Connah <simon.n.connah@protonmail.com> — 2022-10-31T01:49:47Z

    
    
    ------- Original Message -------
    On Monday, October 31st, 2022 at 01:30, David G. Johnston <david.g.johnston@gmail.com> wrote:
    
    
    > On Sun, Oct 30, 2022 at 6:11 PM Simon Connah <simon.n.connah@protonmail.com> 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.
  5. Re: Syntax error

    Bzzzz <lazyvirus@gmx.com> — 2022-10-31T02:12:07Z

    On Mon, 31 Oct 2022 01:49:47 +0000
    Simon Connah <simon.n.connah@protonmail.com> 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
    
    
    
    
  6. Re: Syntax error

    Simon Connah <simon.n.connah@protonmail.com> — 2022-10-31T04:20:37Z

    ------- Original Message -------
    On Monday, October 31st, 2022 at 02:12, Bzzzz <lazyvirus@gmx.com> wrote:
    
    
    > 
    
    > 
    
    > On Mon, 31 Oct 2022 01:49:47 +0000
    > Simon Connah simon.n.connah@protonmail.com 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.