pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #8260: problem with sequence and tablename 4+ messages / 4 participants [nested] [flat]
* BUG #8260: problem with sequence and tablename @ 2013-06-27 15:26 daniel.degasperi@r3-gis.com 0 siblings, 2 replies; 4+ messages in thread From: daniel.degasperi@r3-gis.com @ 2013-06-27 15:26 UTC (permalink / raw) To: pgsql-bugs The following bug has been logged on the website: Bug reference: 8260 Logged by: Daniel Degasperi Email address: daniel.degasperi@r3-gis.com PostgreSQL version: 9.1.7 Operating system: Centos 6.4 Description: I've created a table: CREATE TABLE t23456789012345678901234567890123456789012345678901 ( t1234_id serial, PRIMARY KEY (t1234_id) ) WITH ( OIDS=FALSE ); This generated the sequence: CREATE SEQUENCE t2345678901234567890123456789012345678901234567890_t1234_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 9223372036854775807 START 1 CACHE 1; The table-part in the sequence name was truncated. Best regards, Daniel -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #8260: problem with sequence and tablename @ 2013-06-27 16:56 Christopher Browne <cbbrowne@gmail.com> parent: daniel.degasperi@r3-gis.com 1 sibling, 0 replies; 4+ messages in thread From: Christopher Browne @ 2013-06-27 16:56 UTC (permalink / raw) To: daniel.degasperi@r3-gis.com; +Cc: pgsql-bugs Object names are limited to a length of NAMEDATALEN-1, which defaults to 63, and are documented to be truncated. http://www.postgresql.org/docs/9.2/static/sql-syntax-lexical.html The behaviour you are observing appears to conform to the documentation, and seems reasonable, so I wouldn't think this was a bug. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #8260: problem with sequence and tablename @ 2013-06-27 17:10 Tom Lane <tgl@sss.pgh.pa.us> parent: daniel.degasperi@r3-gis.com 1 sibling, 1 reply; 4+ messages in thread From: Tom Lane @ 2013-06-27 17:10 UTC (permalink / raw) To: daniel.degasperi@r3-gis.com; +Cc: pgsql-bugs daniel.degasperi@r3-gis.com writes: > CREATE TABLE t23456789012345678901234567890123456789012345678901 > ( > t1234_id serial, > PRIMARY KEY (t1234_id) > ) > WITH ( > OIDS=FALSE > ); > This generated the sequence: > CREATE SEQUENCE > t2345678901234567890123456789012345678901234567890_t1234_id_seq That's operating as designed. > The table-part in the sequence name was truncated. Would you rather it failed entirely? You're up against the limit on name length (63 bytes in a standard Postgres build). regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #8260: problem with sequence and tablename @ 2013-06-28 09:59 Daniel Degasperi <daniel.degasperi@r3-gis.com> parent: Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 4+ messages in thread From: Daniel Degasperi @ 2013-06-28 09:59 UTC (permalink / raw) To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs Am 27.06.2013 19:10, schrieb Tom Lane: > daniel.degasperi@r3-gis.com writes: >> CREATE TABLE t23456789012345678901234567890123456789012345678901 >> ( >> t1234_id serial, >> PRIMARY KEY (t1234_id) >> ) >> WITH ( >> OIDS=FALSE >> ); >> This generated the sequence: >> CREATE SEQUENCE >> t2345678901234567890123456789012345678901234567890_t1234_id_seq > That's operating as designed. > >> The table-part in the sequence name was truncated. > Would you rather it failed entirely? You're up against the limit on > name length (63 bytes in a standard Postgres build). I don't know if a fail is the best solution, maybe a NOTICE, that the sequence name is not constructed as might be naively expected, would be appropriate. thanks and regards, Daniel > > regards, tom lane -- *Daniel Degasperi* Project manager *R3 GIS* Srl - GmbH I-39012 Merano/Meran (BZ) - Via Johann Kravogl-Str. 2 I-20133 Milano (MI) - Via Vallisneri 2 web: www.r3-gis.com <http://www.r3-gis.com/; Email: daniel.degasperi@r3-gis.com <mailto:daniel.degasperi@r3-gis.com> Tel. : +39 0473 494949 Fax : +39 0473 069902 *ATTENZIONE!* Le informazioni contenute nella presente e-mail e nei documenti eventualmente allegati sono confidenziali. La loro diffusione, distribuzione e/o riproduzione da parte di terzi, senza autorizzazione del mittente è vietata e può violare il D. Lgs. 196/2003. In caso di ricezione per errore, Vogliate immediatamente informare il mittente del messaggio e distruggere la e-mail. *ACHTUNG!* Die in dieser Nachricht oder in den beigelegten Dokumenten beinhalteten Informationen sind streng vertraulich. Ihre Verbreitung und/oder ihre Wiedergabe durch Dritte ist ohne Erlaubnis des Absenders verboten und verstößt gegen das Legislativdekret 196/2003. Sollten Sie diese Mitteilung irrtümlicherweise erhalten haben, bitten wir Sie uns umgehend zu informieren und anschließend die Mitteilung zu vernichten. *WARNING!* This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclousure or distribution of the material in this e-mail is strictly forbidden and could be against the law (D. Lgs. 196/2003) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2013-06-28 09:59 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2013-06-27 15:26 BUG #8260: problem with sequence and tablename daniel.degasperi@r3-gis.com 2013-06-27 16:56 ` Christopher Browne <cbbrowne@gmail.com> 2013-06-27 17:10 ` Tom Lane <tgl@sss.pgh.pa.us> 2013-06-28 09:59 ` Daniel Degasperi <daniel.degasperi@r3-gis.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox