dbTalk Databases Forums  

[BUGS] BUG #2790: constructor for int2vector seems to be buggy

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2790: constructor for int2vector seems to be buggy in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gurjeet Singh
 
Posts: n/a

Default [BUGS] BUG #2790: constructor for int2vector seems to be buggy - 11-28-2006 , 06:28 AM







The following bug has been logged online:

Bug reference: 2790
Logged by: Gurjeet Singh
Email address: singh.gurjeet (AT) gmail (DOT) com
PostgreSQL version: 8.2beta3
Operating system: Windows
Description: constructor for int2vector seems to be buggy
Details:

I couldn't find any documentation for the data type 'int2vector', so I
assume it is unsupported. And moreover, probably I am using an unsupported
syntax for populating it, so it may be not that high on priority.

But still filing, in case it uncovers something else.

In the first INSERT statement, the array elements are separated by a
comma and a space; in the second one, the ones that are separated by just a
comma, do not get inserted!

I could not reproduce it in standard inetegr arrays.

Session o/p:

postgres=# select version();
version

----------------------------------------------------------------------------
----
------------------------
PostgreSQL 8.2beta3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.2.3
(mi
ngw special 20030504-1)
(1 row)

postgres=# create table t ( a int2vector );
CREATE TABLE
postgres=# insert into t values ( '1, 2, 3' );
INSERT 0 1
postgres=# insert into t values ( '1,2,3, 4' );
INSERT 0 1
postgres=# select * from t;
a
-------
1 2 3
1 4
(2 rows)

postgres=#

Best regards,

--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com

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

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

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2790: constructor for int2vector seems to be buggy - 11-28-2006 , 09:10 AM






"Gurjeet Singh" <singh.gurjeet (AT) gmail (DOT) com> writes:
Quote:
In the first INSERT statement, the array elements are separated by a
comma and a space; in the second one, the ones that are separated by just a
comma, do not get inserted!
The syntax is space-separated integers; where did you get the idea to
use commas?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate


Reply With Quote
  #3  
Old   
Gurjeet Singh
 
Posts: n/a

Default Re: [BUGS] BUG #2790: constructor for int2vector seems to be buggy - 11-28-2006 , 09:20 AM



------=_Part_12024_12282374.1164727172529
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 11/28/06, Tom Lane <tgl (AT) sss (DOT) pgh.pa.us> wrote:
Quote:
The syntax is space-separated integers; where did you get the idea to
use commas?

I donno... I just tried and it worked. But silently ignoring invalid
input...!!???

Potential bug's symptoms:
<quote from=http://www.postgresql.org/docs/current/static/bug-reporting.html
Quote:
A program accepts invalid input without a notice or error message. But keep
in mind that your idea of invalid input might be our idea of an extension or
compatibility with traditional practice.
</quote>

Or is it a 'extension or compatibility with traditional practice'?

BTW, is int2vector really documented? I also found that abstime() works, but
couldn't find any documentation for it! (except for \df abstime)

Regards,

--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | yahoo }.com

------=_Part_12024_12282374.1164727172529
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 11/28/06, <b class="gmail_sendername">Tom Lane</b> &lt;<a href="mailto:tgl (AT) sss (DOT) pgh.pa.us">tgl (AT) sss (DOT) pgh.pa.us</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The syntax is space-separated integers; where did you get the idea to<br>use commas?</blockquote></div><br>I donno... I just tried and it worked. But silently ignoring invalid input...!!???<br><br>Potential bug's symptoms:
<br>&lt;quote from=<a href="http://www.postgresql.org/docs/current/static/bug-reporting.html">http://www.postgresql.org/docs/current/static/bug-reporting.html</a>&gt;<br>A program accepts invalid input without a notice or error message. But
keep in mind that your idea of invalid input might be our idea of an
extension or compatibility with traditional practice.<br>&lt;/quote&gt;<br><br>Or is it a 'extension or compatibility with traditional practice'?<br><br>BTW, is int2vector really documented? I also found that abstime() works, but couldn't find any documentation for it! (except for \df abstime)
<br><br>Regards,<br clear="all"><br>-- <br>gurjeet[.singh]@EnterpriseDB.com<br>singh.gurjeet@{ gmail | hotmail | yahoo }.com

------=_Part_12024_12282374.1164727172529--


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.