Re: BUG #1547: CREATE TYPE AS error

Lists: pgsql-bugs
From: "John Smith" <johnsmit89(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #1547: CREATE TYPE AS error
Date: 2005-03-15 17:43:15
Message-ID: 20050315174315.0FA32F18D1@svr2.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 1547
Logged by: John Smith
Email address: johnsmit89(at)hotmail(dot)com
PostgreSQL version: 8.0
Operating system: Windows 2000
Description: CREATE TYPE AS error
Details:

When trying to create a complex type, the parser produces an error. e.g.
CREAYE TYPE product AS (name varchar, price numeric);
produces
ERROR: parser: parse error at or near "as"


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: John Smith <johnsmit89(at)hotmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-03-18 05:41:09
Message-ID: 20050318054109.GA14340@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Tue, Mar 15, 2005 at 05:43:15PM +0000, John Smith wrote:

> When trying to create a complex type, the parser produces an error. e.g.
> CREAYE TYPE product AS (name varchar, price numeric);
> produces
> ERROR: parser: parse error at or near "as"

Is that the *exact* command you're running? The word CREATE is
misspelled, although that should give a different error:

CREAYE TYPE product AS (name varchar, price numeric);
ERROR: syntax error at or near "CREAYE" at character 1
LINE 1: CREAYE TYPE product AS (name varchar, price numeric);
^

If that's not the actual command, then please copy and paste what
you're really doing.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: John Smith <johnsmit89(at)hotmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-03-23 03:07:13
Message-ID: 20050323030712.GA16098@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Tue, Mar 22, 2005 at 11:05:46PM +0000, John Smith wrote:
> In my haste to write the email I didn't notice the spelling mistake.
> However in postgres I did spell
> CREATE coreectly. I am using the Windows 2000 os and the windows native
> version of PostgresQL 8.0.1. I tried this command in psql and pgaccess.
> Both return the same error - parser error at or near "as". Also I realised
> later the type I was trying to create was a composite, not complex as I
> wrote.

Please copy and paste the exact command you're running and the exact
error message. It's important to copy the actual command and error
rather than type what you *think* they are because minor differences
can sometimes matter.

The following works for me in PostgreSQL 8.0.1:

CREATE TYPE product AS (name varchar, price numeric);

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/


From: "John Smith" <johnsmit89(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-03-28 00:51:42
Message-ID: BAY102-F11A342545FB6FA5F1B25CCCE440@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

I re-installed postgresql as a service and CREATE TYPE AS works. So I then
re-installed postgresql as a program (as I had originally done) and CREATE
TYPE AS doesn't work.
Perhaps you could check this on your system.

John Smith
------------------------------------------------------

>From: Michael Fuhr <mike(at)fuhr(dot)org>
>Reply-To: pgsql-bugs(at)postgresql(dot)org
>To: John Smith <johnsmit89(at)hotmail(dot)com>
>CC: pgsql-bugs(at)postgresql(dot)org
>Subject: Re: [BUGS] BUG #1547: CREATE TYPE AS error
>Date: Tue, 22 Mar 2005 20:07:13 -0700
>
>On Tue, Mar 22, 2005 at 11:05:46PM +0000, John Smith wrote:
> > In my haste to write the email I didn't notice the spelling mistake.
> > However in postgres I did spell
> > CREATE coreectly. I am using the Windows 2000 os and the windows native
> > version of PostgresQL 8.0.1. I tried this command in psql and pgaccess.
> > Both return the same error - parser error at or near "as". Also I
>realised
> > later the type I was trying to create was a composite, not complex as I
> > wrote.
>
>Please copy and paste the exact command you're running and the exact
>error message. It's important to copy the actual command and error
>rather than type what you *think* they are because minor differences
>can sometimes matter.
>
>The following works for me in PostgreSQL 8.0.1:
>
>CREATE TYPE product AS (name varchar, price numeric);
>
>--
>Michael Fuhr
>http://www.fuhr.org/~mfuhr/


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: John Smith <johnsmit89(at)hotmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-04-03 02:23:45
Message-ID: 20050403022344.GA29821@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Mon, Mar 28, 2005 at 12:51:42AM +0000, John Smith wrote:

> I re-installed postgresql as a service and CREATE TYPE AS works. So I then
> re-installed postgresql as a program (as I had originally done) and CREATE
> TYPE AS doesn't work.
> Perhaps you could check this on your system.

Can't help there -- none of my systems distinguish between installing
PostgreSQL as a "service" versus as a "program."

We still haven't seen the *exact* command you're running and the
*exact* error message (the command in your original message had a
typo that results in a different error than the one you posted).
Could you please post a complete set of steps that a person using
the same platform could follow to reproduce the problem? Whenever
possible, please copy and paste commands and output instead of
typing them manually, to avoid introducing mistakes that aren't
really present.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/


From: "John Smith" <johnsmit89(at)hotmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-04-06 23:55:05
Message-ID: BAY102-F19EB0153BBA3CFFB473D2DCE3D0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

I have already told you the exact command I am using - twice. I identified
the problem in my previous email, and how to reproduce it. If you don't have
a system with Windows 2000 then find someone who does. They will then
confirm what I say.
I resent the implication in your emails that I am some stupid user who
does't know what he is doing. Insulting your users is not the best way to
increase your user base.
I have identified the problem, and how to reproduce it. I therefore will not
engage in any further communication on this matter.

Mr. Grumpy

>From: Michael Fuhr <mike(at)fuhr(dot)org>
>Reply-To: pgsql-bugs(at)postgresql(dot)org
>To: John Smith <johnsmit89(at)hotmail(dot)com>
>CC: pgsql-bugs(at)postgresql(dot)org
>Subject: Re: [BUGS] BUG #1547: CREATE TYPE AS error
>Date: Sat, 2 Apr 2005 19:23:45 -0700
>
>On Mon, Mar 28, 2005 at 12:51:42AM +0000, John Smith wrote:
>
> > I re-installed postgresql as a service and CREATE TYPE AS works. So I
>then
> > re-installed postgresql as a program (as I had originally done) and
>CREATE
> > TYPE AS doesn't work.
> > Perhaps you could check this on your system.
>
>Can't help there -- none of my systems distinguish between installing
>PostgreSQL as a "service" versus as a "program."
>
>We still haven't seen the *exact* command you're running and the
>*exact* error message (the command in your original message had a
>typo that results in a different error than the one you posted).
>Could you please post a complete set of steps that a person using
>the same platform could follow to reproduce the problem? Whenever
>possible, please copy and paste commands and output instead of
>typing them manually, to avoid introducing mistakes that aren't
>really present.
>
>--
>Michael Fuhr
>http://www.fuhr.org/~mfuhr/


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: John Smith <johnsmit89(at)hotmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-04-10 21:34:52
Message-ID: 20050410213452.GA83868@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Wed, Apr 06, 2005 at 11:55:05PM +0000, John Smith wrote:
>
> I have already told you the exact command I am using - twice.

Could you post links to the messages in the archives where you twice
identified the command? The only complete CREATE TYPE command I
see is in your original message, which you later admitted contained
a typo:

http://archives.postgresql.org/pgsql-bugs/2005-03/msg00131.php
http://archives.postgresql.org/pgsql-bugs/2005-03/msg00192.php

I don't see any other messages in this thread with a complete CREATE
TYPE command (except the one I posted).

> I identified the problem in my previous email, and how to reproduce
> it. If you don't have a system with Windows 2000 then find someone
> who does. They will then confirm what I say.

I think you're referring to this message:

http://archives.postgresql.org/pgsql-bugs/2005-04/msg00025.php

If anybody has a Windows box, could you please test this?

> I resent the implication in your emails that I am some stupid user who
> does't know what he is doing. Insulting your users is not the best way to
> increase your user base.

Whoa. Hold on there. Nowhere did I insult you or imply that you're
stupid -- I've merely asked for enough information that somebody
else could use to duplicate the problem. You yourself admitted
that your original message contained a typo, so I've just been
trying to clarify exactly what you're doing.

Just so you know, I'm not one of the PostgreSQL developers, so
PostgreSQL users aren't "my" users or "my" user base. Like many
who subscribe to these lists, I volunteer my time to help people
because it's A Nice Thing To Do, and hopefully to remove some of
that burden from the developers so they can spend more time developing.
Please consider how your remarks sound to people who really do want
to help and expect nothing in return.

> I have identified the problem, and how to reproduce it. I therefore will
> not engage in any further communication on this matter.

That's too bad, because if a bug exists then your input might have
been useful. Can anybody else with a Windows system reproduce the
problem? The messages in the links above are said to contain enough
information to do so.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/


From: Diego Cattelan <netmaniac(at)libero(dot)it>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-04-11 06:21:45
Message-ID: 425A1779.6010100@libero.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

>
>
>Can anybody else with a Windows system reproduce the
>problem? The messages in the links above are said to contain enough
>information to do so.
>
>
>

windows XP pro SP2
PostgreSQL 8.0.1

this is working for me (but not tested on win 2000 system):
CREATE TYPE product AS (name varchar, price numeric);


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Diego Cattelan <netmaniac(at)libero(dot)it>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-04-11 14:25:40
Message-ID: 20050411142540.GA29296@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Mon, Apr 11, 2005 at 08:21:45AM +0200, Diego Cattelan wrote:
> >
> >Can anybody else with a Windows system reproduce the
> >problem? The messages in the links above are said to contain enough
> >information to do so.
>
> windows XP pro SP2
> PostgreSQL 8.0.1
>
> this is working for me (but not tested on win 2000 system):
> CREATE TYPE product AS (name varchar, price numeric);

In the following message, the OP says that CREATE TYPE works if he
installs PostgreSQL as a service but it doesn't work if he installs
PostgreSQL as a program (can anybody think of why this would make
a difference?).

http://archives.postgresql.org/pgsql-bugs/2005-04/msg00025.php

Did you test both scenarios? If not, could you do so? Thanks.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: Diego Cattelan <netmaniac(at)libero(dot)it>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-04-11 14:54:43
Message-ID: 29833.1113231283@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

Michael Fuhr <mike(at)fuhr(dot)org> writes:
> In the following message, the OP says that CREATE TYPE works if he
> installs PostgreSQL as a service but it doesn't work if he installs
> PostgreSQL as a program (can anybody think of why this would make
> a difference?).

I found it just about impossible to believe ;-)

I have seen people make such reports because they mistakenly connected
to some other server entirely while trying to test one of the two
supposedly similar installations. If the other server is of an old
version then it might not have CREATE TYPE AS, for instance.

regards, tom lane


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Diego Cattelan <netmaniac(at)libero(dot)it>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #1547: CREATE TYPE AS error
Date: 2005-04-11 15:29:06
Message-ID: 20050411152906.GA29545@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

On Mon, Apr 11, 2005 at 10:54:43AM -0400, Tom Lane wrote:
> Michael Fuhr <mike(at)fuhr(dot)org> writes:
> > In the following message, the OP says that CREATE TYPE works if he
> > installs PostgreSQL as a service but it doesn't work if he installs
> > PostgreSQL as a program (can anybody think of why this would make
> > a difference?).
>
> I found it just about impossible to believe ;-)
>
> I have seen people make such reports because they mistakenly connected
> to some other server entirely while trying to test one of the two
> supposedly similar installations. If the other server is of an old
> version then it might not have CREATE TYPE AS, for instance.

Yeah, that's why I asked the OP for details on how to reproduce the
problem, but apparently he's not interested in investigating that
possibility ("I resent the implication in your emails that I am
some stupid user who does't [sic] know what he is doing").

It looks like CREATE TYPE AS was added in 7.3, so if your hypothesis
is correct then he'd be connecting to 7.2 or older.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/