Re: [HACKERS] Assertion failure due to ColumnRefStar

2007-09-27 Thread Tom Lane
I wrote:
> The problem here is that in the output of the grammar, * is represented
> exactly the same as "*" would be ... I suppose this representation was
> chosen back in the day before we had full support for quoted column
> names.

I took a brief look at this.  Changing that representation seems like
it'd be a fairly simple exercise, but I don't want to get into doing it
before 8.3 beta, and it'd be too invasive for a back-patch anyway.  What
I propose for the moment is to replace the Assert with a plain elog:

if (!targetlist)
elog(ERROR, "invalid use of *");

Thoughts?

regards, tom lane

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

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


Re: [HACKERS] Assertion failure due to ColumnRefStar

2007-09-27 Thread Tom Lane
Heikki Linnakangas <[EMAIL PROTECTED]> writes:
> NikhilS wrote:
>> One of our qmg folks reported an assertion failure:
>> create table x(y char(1));
>> insert into x  values ("*");
>> 
>> The above causes the following assertion to be hit:

> Works for me on CVS HEAD. Which version of Postgres is this?

I see the assert failure here --- maybe you were testing a non-assert
build?

The problem here is that in the output of the grammar, * is represented
exactly the same as "*" would be ... I suppose this representation was
chosen back in the day before we had full support for quoted column
names.

regards, tom lane

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

   http://archives.postgresql.org


Re: [HACKERS] Assertion failure due to ColumnRefStar

2007-09-27 Thread Heikki Linnakangas
NikhilS wrote:
> One of our qmg folks reported an assertion failure:
> 
> create table x(y char(1));
> insert into x  values ("*");
> 
> The above causes the following assertion to be hit:

Works for me on CVS HEAD. Which version of Postgres is this?

-- 
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

---(end of broadcast)---
TIP 6: explain analyze is your friend