BUG #2773: Problem pg_get_serial_sequence

Поиск
Список
Период
Сортировка
Искать

BUG #2773: Problem pg_get_serial_sequence

От:
"Amelio" <ameliocf@yahoo.com.br>
Дата:
The following bug has been logged online:

Bug reference:      2773
Logged by:          Amelio
Email address:      ameliocf@yahoo.com.br
PostgreSQL version: 8.2 beta 2
Operating system:   Windows XP
Description:        Problem pg_get_serial_sequence
Details: 

The pg_get_serial_sequence function is returning the name of the index on
the referenced column.

Re: BUG #2773: Problem pg_get_serial_sequence

От:
Bruce Momjian <bruce@momjian.us>
Дата:
Amelio wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      2773
> Logged by:          Amelio
> Email address:      ameliocf@yahoo.com.br
> PostgreSQL version: 8.2 beta 2
> Operating system:   Windows XP
> Description:        Problem pg_get_serial_sequence
> Details: 
> 
> The pg_get_serial_sequence function is returning the name of the index on
> the referenced column.

Can you provide a reproducible test case?  It looks OK to me:

	test=> CREATE TABLE test (x SERIAL);
	NOTICE:  CREATE TABLE will create implicit sequence "test_x_seq" for
	serial column "test.x"
	CREATE TABLE

	test=> SELECT pg_get_serial_sequence('test', 'x');
	 pg_get_serial_sequence
	------------------------
	 public.test_x_seq
	(1 row)
	
	test=> CREATE INDEX i_test ON test(x);
	CREATE INDEX

	test=> SELECT pg_get_serial_sequence('test', 'x');
	 pg_get_serial_sequence
	------------------------
	 public.test_x_seq
	(1 row)

-- 
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: BUG #2773: Problem pg_get_serial_sequence

От:
Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
Дата:
Amelio wrote:
> The following bug has been logged online:
> 
> Bug reference:      2773
> Logged by:          Amelio
> Email address:      ameliocf@yahoo.com.br
> PostgreSQL version: 8.2 beta 2
> Operating system:   Windows XP
> Description:        Problem pg_get_serial_sequence
> Details: 
> 
> The pg_get_serial_sequence function is returning the name of the index on
> the referenced column.

Thanks for the report but this is is already fixed in the current codebase:

http://archives.postgresql.org/pgsql-committers/2006-11/msg00074.php


Stefan

Re: BUG #2773: Problem pg_get_serial_sequence

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Bruce Momjian  writes:
> Amelio wrote:
>> The pg_get_serial_sequence function is returning the name of the index on
>> the referenced column.

> Can you provide a reproducible test case?  It looks OK to me:

That's because it's been fixed...
http://archives.postgresql.org/pgsql-committers/2006-11/msg00074.php

			regards, tom lane
FAQ