Thread: BUG #1547: CREATE TYPE AS error
The following bug has been logged online: Bug reference: 1547 Logged by: John Smith Email address: johnsmit89@hotmail.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"
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/
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/
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@fuhr.org> >Reply-To: pgsql-bugs@postgresql.org >To: John Smith <johnsmit89@hotmail.com> >CC: pgsql-bugs@postgresql.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/
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/
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@fuhr.org> >Reply-To: pgsql-bugs@postgresql.org >To: John Smith <johnsmit89@hotmail.com> >CC: pgsql-bugs@postgresql.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/
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/
> > >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);
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/
Michael Fuhr <mike@fuhr.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
On Mon, Apr 11, 2005 at 10:54:43AM -0400, Tom Lane wrote: > Michael Fuhr <mike@fuhr.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/