Unix Technical Forum

BUG #1547: CREATE TYPE AS error

This is a discussion on BUG #1547: CREATE TYPE AS error within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1547 Logged by: John Smith Email address: johnsmit89@hotmail.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:39 AM
John Smith
 
Posts: n/a
Default 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"

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 09:39 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1547: CREATE TYPE AS error

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/

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 09:40 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1547: CREATE TYPE AS error

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/

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 09:44 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1547: CREATE TYPE AS error

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/

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 09:44 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1547: CREATE TYPE AS error

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...3/msg00131.php
http://archives.postgresql.org/pgsql...3/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...4/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/

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-10-2008, 09:45 AM
Diego Cattelan
 
Posts: n/a
Default Re: BUG #1547: CREATE TYPE AS error

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


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 04-10-2008, 09:45 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1547: CREATE TYPE AS error

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...4/msg00025.php

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

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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 04-10-2008, 09:45 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #1547: CREATE TYPE AS error

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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-10-2008, 09:45 AM
Michael Fuhr
 
Posts: n/a
Default Re: BUG #1547: CREATE TYPE AS error

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/

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:05 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com