Re: [BUGS] Fwd: Bug#253295: postgresql: VACUUM FULL produce warnings

2004-07-08 Thread Martin Pitt
Hi Tom!

On 2004-06-23 11:09 -0400, Tom Lane wrote:
> Martin Pitt <[EMAIL PROTECTED]> writes:
> > Recently we got the following bug report about VACUUM FULL. Can
> > anybody comment on this?
> 
> This was reported to the PG lists already.  We asked for a test case
> but didn't get one ...

Then maybe Ed ([EMAIL PROTECTED]) can help you since it appears that he can
reproduce the problem. Since I can't, maybe you can talk with him
directly?

Thanks and have a nice day!

Martin

-- 
Martin Pitt Debian GNU/Linux Developer
[EMAIL PROTECTED]  [EMAIL PROTECTED]
http://www.piware.de http://www.debian.org


signature.asc
Description: Digital signature


[BUGS] Fwd: postgresql-autodoc - missinterprets "version"

2004-07-08 Thread Martin Pitt
Hi PostgreSQL developers!

Recently we got the bug report below. It seems that there is a special
treatment of columns named "version". Normally fields of primary key
indices are printed out unquoted, however, if the column is named
"version", the name is printed out in quotes. 

This behaviour seems to confuse PostgreSQL autotoc.

Does this behaviour serve any purpose or it is an error?

Thanks and have a nice day!

Martin

- Forwarded message from Bastian Blank <[EMAIL PROTECTED]> -

Date: Sat, 29 May 2004 17:17:42 +0200
From: Bastian Blank <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: postgresql-autodoc - missinterprets "version"
X-Spam-Status: No, hits=-7.0 required=4.0 tests=BAYES_01,HAS_PACKAGE 
autolearn=no version=2.60-bugs.debian.org_2004_03_25

Package: postgresql-autodoc
Version: 1.22-2
Severity: normal

postgresql_autodoc missinterprets fields with name "version", as
postgresql sometimes reports version, sometimes "version".

| F-Key   Name Type Description
| "version" UNIQUE#1
| id   serial   PRIMARY KEY
| package.version.id  version  integer  NOT NULL
| package.binarypackage_name.id   binarypackage_name   integer  UNIQUE#1 NOT NULL

Bastian

-- 
Military secrets are the most fleeting of all.
-- Spock, "The Enterprise Incident", stardate 5027.4



- End forwarded message -
- Forwarded message from Tommaso Moroni <[EMAIL PROTECTED]> -

Date: Mon, 31 May 2004 20:43:08 +0200
From: Tommaso Moroni <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Processed: reassigning bug #251595 to postgresql package
Mail-Followup-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
version=2.60-bugs.debian.org_2004_03_25

On Mon, May 31, 2004 at 06:09:58PM +0100, Oliver Elphick wrote:
> What SQL command produced these results?

Actually they are the postgresql-autodoc output. Here's what
I've tried:


test=> CREATE TABLE test (version smallint primary key);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "test_pkey" for table 
"test"
CREATE TABLE
test=> \d test
   Tabella "public.test"
 Colonna |   Tipo   | Modificatori
-+--+--
 version | smallint | not null
Indici:
"test_pkey" chiave primaria, btree ("version")


The strange thing is the last line. I also tried with different 
field types and got the same results. However if the field name isn't
"version" there are no problem at all.


I hope it helps.
-- 
Tommaso Moroni
[EMAIL PROTECTED]



- End forwarded message -

-- 
Martin Pitt Debian GNU/Linux Developer
[EMAIL PROTECTED]  [EMAIL PROTECTED]
http://www.piware.de http://www.debian.org


signature.asc
Description: Digital signature


Re: [BUGS] Fwd: postgresql-autodoc - missinterprets "version"

2004-07-08 Thread Stephan Szabo

On Thu, 8 Jul 2004, Martin Pitt wrote:

> Hi PostgreSQL developers!
>
> Recently we got the bug report below. It seems that there is a special
> treatment of columns named "version". Normally fields of primary key
> indices are printed out unquoted, however, if the column is named
> "version", the name is printed out in quotes.
>
> This behaviour seems to confuse PostgreSQL autotoc.
>
> Does this behaviour serve any purpose or it is an error?

It doesn't appear to be necessary to quote the identifier, however version
and "version" refer to the same identifier in this case so I wouldn't call
it an error, either.  My guess as to the reason comes from this comment
fragment in quote_identifier:

* Check for keyword.  This test is overly strong, since many of
* the "keywords" known to the parser are usable as column names,
* but the parser doesn't provide any easy way to test for whether
* an identifier is safe or not... so be safe not sorry.

version is one of those keywords that are usable as column names I
believe.


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


Re: [BUGS] Fwd: postgresql-autodoc - missinterprets "version"

2004-07-08 Thread Martin Pitt
Hi Stephan!

On 2004-07-08  7:10 -0700, Stephan Szabo wrote:
> It doesn't appear to be necessary to quote the identifier, however version
> and "version" refer to the same identifier in this case so I wouldn't call
> it an error, either.  My guess as to the reason comes from this comment
> fragment in quote_identifier:
> 
> * Check for keyword.  This test is overly strong, since many of
> * the "keywords" known to the parser are usable as column names,
> * but the parser doesn't provide any easy way to test for whether
> * an identifier is safe or not... so be safe not sorry.

This makes sense, thank you. I reassigned this bug to
postgresql-autodoc. Just ignoring the quotes cannot be that
difficult...

Thanks and have a nice day!

Martin

-- 
Martin Pitt Debian GNU/Linux Developer
[EMAIL PROTECTED]  [EMAIL PROTECTED]
http://www.piware.de http://www.debian.org


signature.asc
Description: Digital signature


[BUGS] 7.4: serial not working ?

2004-07-08 Thread vertigo
Hello
i upgraded postgresql from 7.3 to 7.4 and noticed that SERIAL
exists but does not working. Example:
My table:
create table1(
id SERIAL,
name VARCHAR(100)
);
insert into table1 (name) values('name1');
ERROR:  duplicate key violates unique constraint "table1_pkey"
Why ? I want to have autoincrementation. I do not know (when i insert 
record) what id values should it have.
How can i solve this problem ?

Thanx
Michal
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]


Re: [BUGS] 7.4: serial not working ?

2004-07-08 Thread Oliver Elphick
On Fri, 2004-07-02 at 11:24, vertigo wrote:
> Hello
> i upgraded postgresql from 7.3 to 7.4 and noticed that SERIAL
> exists but does not working. Example:
> My table:
> create table1(
> id SERIAL,
> name VARCHAR(100)
> );
> 
> insert into table1 (name) values('name1');
> ERROR:  duplicate key violates unique constraint "table1_pkey"
> 
> Why ? I want to have autoincrementation. I do not know (when i insert 
> record) what id values should it have.
> How can i solve this problem ?

You already have rows in that table, and the sequence is generating a
key which already exists.  This is not MySQL!

To cure this, set the sequence to the highest value in the table and
don't insert explicit values for that column:

   SELECT setval('table1_id_seq', (SELECT MAX(id) FROM table1));

(or something like that).


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


Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2

2004-07-08 Thread Ted Kremenek
Thank you for the confirmation.

Best,
Ted

-Original Message-
From: Michael Meskes [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 05, 2004 11:55 AM
To: Tom Lane
Cc: Neil Conway; Ted Kremenek; [EMAIL PROTECTED]; Michael Meskes
Subject: Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2

On Sun, May 02, 2004 at 07:50:46PM -0400, Tom Lane wrote:
> >> [BUG] memory leak on error path (dtype != DTK_DELTA)
> >> File where bug occurred: 
> >> postgresql-7.4.2/src/interfaces/ecpg/pgtypeslib/interval.c
> 
> > Looks suspicious to me, but ECPG is Michael Meskes' domain -- Michael?
> 
> It's entirely likely that ecpg's derivative of the backend's datetime
> modules contains lots and lots of memory leaks, since AFAIK the palloc
> infrastructure is not there in the ecpg environment :-(.

This is true of course. But I'm hopeful we found most of the possible
leaks. This one certainly was not found. 

Fix just committed.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED]
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]