Re: [GENERAL] one more word about rules
ID shouldn't contain any additional informations (like order). It's ID. Use another field for sorting. At 16:33 22.9.2000 , Abe Asghar wrote: Hi everyone, I have built a database that uses int4 as the unique identifier for a news database. Therefore an article has a identifier 1, the next one has 2 etc. Then I order them when they are displayed on the web reversely so that the last article added is at the top of the list. I now face a major problem. If we need to back dackdate an article - I can't. This is because the all the indexes are taken up ie 1, 2, 3..75 odd records. If I want to add one between 50 and 51 ie 50.5, I cannot because the field is an int4. One idea I had to get around this was to create a new table with this column as a float and read and write all therecords in with a PHP script. Is there an easier way such as converting the column data type from a int4 to a float. Thanks in advance. Abe.
[GENERAL] RE: [HACKERS] List funnies ?
Me too, and I'm getting some stuff two times, like I'm double subscribed (which I shouldn't be). Sometimes it takes few days for messages to appear on list etc. At 10:12 14.9.2000 , [EMAIL PROTECTED] wrote: I was just about to ask the same question... med vänlig hälsning /Dana -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Thursday, September 14, 2000 10:09 AM To:[EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [HACKERS] List funnies ? Has something happened to the list server ? I am only subscribed to the general list, but after two days of nothing I'm now getting the hackers list stuff. Steve -- thorNET - Internet Consultancy, Services Training Phone: 01454 854413 Fax: 01454 854412 http://www.thornet.co.uk
Re: [GENERAL] Indexes not working (bug in 7.0.2?)
Manual says you should use it after initial data entry, after entering a large amount of rows and periodically. At 23:02 4.9.2000 , Zlatko Calusic wrote: Tom Lane [EMAIL PROTECTED] writes: Zlatko Calusic [EMAIL PROTECTED] writes: It is now NOT using the index, and I don't understand why? Queries are practically the same, tables are practically the same, why is postgres using indexes in the first case and not in the second? Because it has substantially different ideas about the sizes of the two tables --- notice the different estimated row counts. If you haven't "vacuum analyzed" these tables recently, do so to bring the planner's statistics up-to-date, and then see what you get. You may also care to read the user's manual chapter about EXPLAIN, http://www.postgresql.org/users-lounge/docs/7.0/postgres/c4888.htm Yes, thanks to all who helped. 'vacuum analyze' was the magical incantation that helped. I still have one uncertainty. Is it possible that after some time postgres once again decides not to use indices (assuming I haven't run 'vacuum analyze' again)? -- Zlatko
[GENERAL] JDBC and Unicode problem
Hello, I'm trying to store / retrieve data from UNICODE database, but without success. I installet PostgreSQL 7.02 binaries for RedHat Linux on RH 6.2 I created database with UNICODE as charset (createdb -E UNICODE name) I can establish JDBC connection and everything works fine when I use ASCII characters. When I use non-ASCII characters, I get all kind of stuff. I tried to store data using * setString * setObject * setBytes * setUnicodeStream without success. My questions are: * Are binaries configured for UNICODE support? * How can I check are binaries configured for UNICODE support? * Do I have to set somethinh in Java in order to get UNICODE working? * Which method should I use to read UNICODE data? I have to enter multilingual data so I can't switch to national character set. v Zeljko Trogrlic Aeris d.o.o. Sv. Petka 60 b, HR-31000 Osijek, Croatia Tel: +385 (31) 53 00 15 Email: mailto:[EMAIL PROTECTED]
[GENERAL] Column name case conversion
Hello, I'm getting strange length results for columns with UNICODE data. I entered following string into database: abcüäöèæ First three characters are ASCII, second three are German and third three are Croatian. When I execute: select name, length(name), character_length(name), octet_length(name) from location where id = 4 I get: name = abcüäöèæ (9 characters) length = 5 character_length = 5 octet_length = 9 OK, maybe my UNICODE is not setup well, but length and character_length must be 9. I guess octet:length should be at least 12 to 15 (in case UNICODE is OK). v Zeljko Trogrlic Aeris d.o.o. Sv. Petka 60 b, HR-31000 Osijek, Croatia Tel: +385 (31) 53 00 15 Email: mailto:[EMAIL PROTECTED]
Re: [GENERAL] JDBC
The problem could be in incorrectly implemented getTables. PostgreSQL JDBC returns null. It's not defined that this column may be null, like TABLE_CAT and TABLE_SCHEM. Actually, it returns just names, null for everything else and "no remarks" for remarks. From JDBC documentation: 4. TABLE_TYPE String = table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM". The second problem is that getTables returns index names, too, and it probably shouldn't, I'm not sure how is that specified. At 11:57 5.9.2000 , Peter Mount wrote: The problem seems to be on how JBuilder is asking JDBC for the list of tables. It's on my list of things to check, although it's difficult without a copy of JBuilder (with the database components) to play with. Peter -- Peter T Mount mailto:[EMAIL PROTECTED][EMAIL PROTECTED], mailto:[EMAIL PROTECTED][EMAIL PROTECTED] Homepage: http://www.retep.org.ukhttp://www.retep.org.uk Contact details: http://petermount.comhttp://petermount.com PostgreSQL JDBC: http://www.retep.org.uk/postgres/http://www.retep.org.uk/postgres/ Java PDF Generator: http://www.retep.org.uk/pdf/http://www.retep.org.uk/pdf/ - Original Message - From: mailto:[EMAIL PROTECTED]Enrico Comini To: mailto:[EMAIL PROTECTED]ML-Postrges-general Sent: Monday, September 04, 2000 4:57 PM Subject: [GENERAL] JDBC HI, I'm having a strange problem connecting to postgres 7.02 using the jdbc driver. After installing the driver in Jbuilder 3, I'm able to connect to my database but can ONLY see the postgres system indexes in Jbuilder's JDBC Explorer GUI. I'm unable to see my other database objects (tables, views, etc...) in the JDBC Explorer. Yet the driver lets me manipulate these unseen objects when I execute sql statements against the database. Problem is, I'd like to see all my database objects in the JDBC Explorer GUI, not just the system index. Has anyone experienced this who can suggest a fix? Does anyone know if this is due to Jbuilder, the postgresql.Driver, or perhaps a bad configuration? Thanks. ENRICO v Zeljko Trogrlic Aeris d.o.o. Sv. Petka 60 b, HR-31000 Osijek, Croatia Tel: +385 (31) 53 00 15 Email: mailto:[EMAIL PROTECTED]