[GENERAL] ECPG bug or development choice

2003-09-09 Thread Thierry Missimilly
Hi, I'm not sure it's a bug or it's normal, so i don't send it to pgsq-bugs. Well, i have written pgbench in PRO*C to have a common pgbench.pgc source for Postgres and Oracle. However, there are some differences between the Postgres Pro*c and Oracle Pro*c. So, i use #ifdef ORACLE #else #endif

Re: [GENERAL] ECPG bug or development choice

2003-09-09 Thread Michael Meskes
On Tue, Sep 09, 2003 at 02:48:19PM +0200, Thierry Missimilly wrote: I'm not sure it's a bug or it's normal, so i don't send it to pgsq-bugs. ... So, i use #ifdef ORACLE #else #endif preprocessing instructions to differentiate PG from Oracle Pro*c syntaxes. As a matter of fact we use EXEC

Re: [GENERAL] mysql create table - psql

2003-09-09 Thread Scott Cain
You might want to take a look at a Perl module, SQL::Translator, which translates schema elements (table creates, indexes, views) from one DB's SQL to another. I don't know if the S::T on CPAN is up to date, so you might want to try their website to get the CVS version:

Re: [GENERAL] mysql create table - psql

2003-09-09 Thread scott.marlowe
On Tue, 9 Sep 2003, Richard Huxton wrote: On Tuesday 09 September 2003 07:10, expect wrote: Hello, Trying to get this MySql create table command to work, no luck. create sequence serial; CREATE TABLE outbound ( source char(100) default '', destination char(100) default '',

Re: [GENERAL] Views and Limits

2003-09-09 Thread Jonathan Bartlett
How would that possibly make any sense? A view is supposed to be a self-contained, logically consistent object ... not something that exerts magical action-at-a-distance powers upon queries that reference it. Oh, I see, you just don't love us enough to give us magical powers to our views.

Re: [GENERAL] mysql create table - psql

2003-09-09 Thread Franco Bruno Borghesi
the problem is constraint id PRIMARY (id), it should be constraint id PRIMARY KEY (id). Besides that, you will have problems with '-00-00'... month starts at 1, day starts at 1, and I don't know about year 0. Maybe this field 'time' should be NULLable, or maybe its default value should be

Re: [GENERAL] German special characters Problem

2003-09-09 Thread Dennis Gearon
Amin Schoeib wrote: Hi, Can somebody tell me why german special characters like 'ü' or 'ä' will be changed To '?' when retrieving data from postgres with Java (JDBC). When I select the data under Postgres everything is ok. The problem occurs when I select the data with Java. ??? Hope

Re: [GENERAL] German special characters Problem

2003-09-09 Thread Amin Schoeib
So what can I do that I don't get wrong characters??? -Ursprüngliche Nachricht- Von: Dennis Gearon [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 9. September 2003 16:11 An: Amin Schoeib Cc: [EMAIL PROTECTED] Betreff: Re: [GENERAL] German special characters Problem Amin Schoeib wrote:

Re: [GENERAL] ECPG bug or development choice

2003-09-09 Thread Thierry Missimilly
Yes, i've discovered that and Oracle uses EXEC ORACLE ifdef So, that means it is not possible to have one and only one source file for a Proc*c program which could be run on Postgres and Oracle. Thank for your fast answer. Thierry Michael Meskes wrote: On Tue, Sep 09, 2003 at 02:48:19PM

Re: [GENERAL] German special characters Problem

2003-09-09 Thread Amin Schoeib
Is it possible to change the encoding on a existing Database? I mda this: psql -l List of databases Name| Owner | Encoding ---+---+--- test | pgsql | SQL_ASCII (1 rows) I think for german and other european languages I must use UNICODE But how can I

Re: [GENERAL] German special characters Problem

2003-09-09 Thread Dennis Gearon
Someone else will have to tell you this. Or, you can look up 'initdb' in the manuals or at: http://marc.theaimsgroup.com/ (under databases/postgresql) I am mostly a user at this point, but I've seen your problem mentioned and I replied with what I've seen is usually the problem. Amin

[GENERAL] Oracle and regular expressions ???

2003-09-09 Thread snpe
New features in version 10g (commin soon) : SQL Regular Expressions ... regards ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] inserting an apostrophe

2003-09-09 Thread Ron
Peter Choe wrote: i am trying to add a record of a name. the name has an apostrophe (O'Neil). i am doing this through a servlet and wrote the code to use PreparedStatement. when i do: ... PrepareStatement pstmt = con.prepareStatement(INSERT INTO directory (name, phone) VALUES (?,?));

Re: [GENERAL] why does count take so long?

2003-09-09 Thread Jean-Luc Lachance
How about keeping counts of inserts, deletes and updates per table per transaction as part of the live statistics? Tom Lane wrote: I said: Greg Stark [EMAIL PROTECTED] writes: Things like count(*) could use int4 until it overflows though. I don't see a reasonable way for an aggregate

Re: [GENERAL] German special characters Problem

2003-09-09 Thread Darko Prenosil
On Tuesday 09 September 2003 16:10, Dennis Gearon wrote: Amin Schoeib wrote: Hi, Can somebody tell me why german special characters like '' or '' will be changed To '?' when retrieving data from postgres with Java (JDBC). When I select the data under Postgres everything is ok. The

Re: [GENERAL] why does count take so long?

2003-09-09 Thread Dennis Gearon
Is improving count(*) a lot if possible on one of the TODO lists? Jean-Luc Lachance wrote: How about keeping counts of inserts, deletes and updates per table per transaction as part of the live statistics? Tom Lane wrote: I said: Greg Stark [EMAIL PROTECTED] writes: Things like

[GENERAL] Picture with Postgres and Delphi

2003-09-09 Thread Edwin Quijada
Hi !! Everybody I am developing app using Delphi and I have a question: I have to save pictures into my database. Each picture has 20 o 30k aprox. What is the way more optimus? That 's table will have 50 records around. Somebody said the best way to do that was encoder the picture to field

Re: [GENERAL] why does count take so long?

2003-09-09 Thread scott.marlowe
The problem with that approach is that while there may only be one or two tables that you want to do max(field) on, it would require that all tables be kept track of, increasing overhead. Keep in mind, select id from table order by id desc limit 1 is a snap, hits the indexes, and runs fast.

[GENERAL] any chance of like ANY (array[]) like the = ANY (array[]) syntax?

2003-09-09 Thread Greg Stark
I find myself wishing I had a syntax LIKE ANY (array['foo','bar']). I don't see much value in the = ANY, = ALL, ANY, ALL syntax since they're equivalent more or less to IN and NOT IN. But it could be neat if other operators were supported. As it turns out this isn't immediately relevant, it

[GENERAL] encoding again

2003-09-09 Thread Kathy Zhu
Hi, sorry that this email is a little bit long, but it is actully not :-)) I have a database 'unidb' created with -E UNICODE. $ psql -l List of databases Name| Owner | Encoding ---+-+--- unidb | kathy | UNICODE I input Chinese data

[GENERAL] do child tables inherit indexes?

2003-09-09 Thread floyds
do child tables inherit the indexes declared for a parent table? or do i need to redeclare the index on each child table? for example: create table fee ( fie text ); create index fee_index on fee ( fie ); create table foe ( fum text ) inherits foo; create index foe_index on foe ( fie

[GENERAL] arbitrary data scheme

2003-09-09 Thread Petr Duchon
Hello everybody, Is it possible to design an arbitrary, hierarchical data scheme, that would allow its modification extension during devel process? In ideal case, it should also support some inheritance. I tried ltree for the hierarchy, and that worx fine. But I ran into problems when

Re: [GENERAL] why does count take so long?

2003-09-09 Thread Doug McNaught
Joseph Shraibman [EMAIL PROTECTED] writes: Tom Lane wrote: Something to think about for 7.5 (too late for 7.4 I fear). What about 7.4.1? This wouldn't affect how data is stored on disk, which is what would keep an upgrade out of a minor release, right? Minor releases are basically

Re: [GENERAL] why does count take so long?

2003-09-09 Thread Bruce Momjian
Joseph Shraibman wrote: Tom Lane wrote: Something to think about for 7.5 (too late for 7.4 I fear). What about 7.4.1? This wouldn't affect how data is stored on disk, which is what would keep an upgrade out of a minor release, right? We only do bug fixes in minor releases like 7.4.1.

Re: [GENERAL] left outer join terrible slow compared to inner join

2003-09-09 Thread Clay Luther
I had an opportunity to test this massive left outer join this with 7.4b2 today. It took 3 seconds on an untuned, new install...which is MUCH better. In fact, it performed as well as Oracle 9i. cwl -Original Message- From: Clay Luther Sent: Thursday, August 28, 2003 1:26 PM To:

[GENERAL] Find overlapping time intervals, how?

2003-09-09 Thread Holger Marzen
Say, we have uptimes from several servers: Server up_from up_to -- --- --- s1 0:00 8:00 s1 10:0020:00 s1 22:0024:00 (would better be a timestamp with 0:00 and next day) s2 0:00 4:00 s2 6:00 23:00 Now we want to

Re: [GENERAL] do child tables inherit indexes?

2003-09-09 Thread Karsten Hilbert
Shackelford Motto: ACTA NON VERBA - Actions, not words Your sig defies your motto. Karsten -- GPG key ID E4071346 @ wwwkeys.pgp.net E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346 ---(end of broadcast)--- TIP 5: Have you checked our extensive

Re: [GENERAL] Picture with Postgres and Delphi

2003-09-09 Thread Darko Prenosil
- Original Message - From: Edwin Quijada [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 6:54 PM Subject: [GENERAL] Picture with Postgres and Delphi Hi !! Everybody I am developing app using Delphi and I have a question: I have to save pictures into my

Re: [GENERAL] Picture with Postgres and Delphi

2003-09-09 Thread Darko Prenosil
- Original Message - From: listy.mailowe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 8:10 PM Subject: Re: [GENERAL] Picture with Postgres and Delphi Hi, Edwin Quijada wrote: Hi !! Everybody I am developing app using Delphi and I have a question: I

Re: [GENERAL] Kill -9 Postmaster and Temporary Tables

2003-09-09 Thread Tom Lane
Daniel Schuchardt [EMAIL PROTECTED] writes: I'v noticed if you kill -9 the Postmaster Temporary Tables (Shemas) will stay in the DB. That is a bad thing to do in any case ;-) But yeah, they'll stay around. In 7.3 and later, they will get cleaned out eventually (whenever someone next uses

Re: [GENERAL] any chance of like ANY (array[]) like the = ANY (array[]) syntax?

2003-09-09 Thread Tom Lane
Greg Stark [EMAIL PROTECTED] writes: I find myself wishing I had a syntax LIKE ANY (array['foo','bar']). You do, because LIKE has an equivalent operator. foo ~~ ANY (array[]) regards, tom lane ---(end of

Re: [GENERAL] Find overlapping time intervals, how?

2003-09-09 Thread Andrew L. Gould
On Tuesday 09 September 2003 02:29 pm, Holger Marzen wrote: Say, we have uptimes from several servers: Server up_from up_to -- --- --- s1 0:00 8:00 s1 10:0020:00 s1 22:0024:00 (would better be a timestamp with 0:00 and next day) s2

Re: [GENERAL] Picture with Postgres and Delphi

2003-09-09 Thread scott.marlowe
On Tue, 9 Sep 2003, Darko Prenosil wrote: - Original Message - From: Edwin Quijada [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, September 09, 2003 6:54 PM Subject: [GENERAL] Picture with Postgres and Delphi Hi !! Everybody I am developing app using Delphi and I

Re: [GENERAL] to_timestamp and to_date fails in postgresql 7.1.3

2003-09-09 Thread Alvaro Herrera Munoz
On Tue, Sep 09, 2003 at 06:36:48PM +, kaab kaoutar wrote: A client is using postgresql 7.1.3, and to_date() and to_timestamp() functions fail sometimes,However they never do in postgresql 7.3.2. Are these bugs? Maybe you are getting some interval with the seconds field set to 60? It was

Re: [GENERAL] Picture with Postgres and Delphi

2003-09-09 Thread Jonathan Bartlett
I'm a big fan of bytea. In every case where I've done the filesystem method I wished I hadn't. Jon On Tue, 9 Sep 2003, Edwin Quijada wrote: Hi !! Everybody I am developing app using Delphi and I have a question: I have to save pictures into my database. Each picture has 20 o 30k aprox.

Re: [GENERAL] encoding again

2003-09-09 Thread Peter Eisentraut
Kathy Zhu writes: 1) the sorting is based on unicode value, not EUC_CN encoding value. The sorting is always based on the server encoding. There is no way to change that. 2) I wrote the ResultSet to a file by using OutputStreamWriter(file, EUC_CN). The file is not readable from the browser

Re: [GENERAL] Picture with Postgres and Delphi

2003-09-09 Thread Jeff Eckermann
--- Jonathan Bartlett [EMAIL PROTECTED] wrote: I'm a big fan of bytea. In every case where I've done the filesystem method I wished I hadn't. For the education of me and maybe others too, why was that? i.e. what problems did you run into, that bytea avoids?

[GENERAL] How to convert a UnixTimestamp to a PostgreSQL date without using ::abstime ?

2003-09-09 Thread Bruno BAGUETTE
Hello, I'm looking for a way to convert a unix timestamp to a PostgreSQL date without using ::abstime which seems to be deprecated. Currently, I do that query : levure= select 1063147331.843::int4::abstime; abstime 2003-09-10 00:42:12+02 (1 row) What can I

Re: [GENERAL] encoding again

2003-09-09 Thread Kathy Zhu
Thanks for your reply !! I am using 7.3.1. 3) to be more specific about data change/loss after conversion input data in unicode with Client_encoding set to UNICODE logging-threshold=\u65e5\u5fd7\u9608\u503c polling_setting_error=\u8bbe\u7f6e\u8f6e\u8be2\u95f4\u9694\u65f6\u51fa\u9519 retrieved

Re: [GENERAL] Find overlapping time intervals, how?

2003-09-09 Thread Alvaro Herrera Munoz
On Tue, Sep 09, 2003 at 09:29:58PM +0200, Holger Marzen wrote: Say, we have uptimes from several servers: Server up_from up_to -- --- --- s1 0:00 8:00 s1 10:0020:00 s1 22:0024:00 (would better be a timestamp with 0:00 and next day)

[GENERAL] bolb data type

2003-09-09 Thread Gagan Anand
Hello, i have data in form of images which are in GB's, i need to store the extracted data from the images. This will required large fields size. I was thinking of Blob data type as we have in Oracle. Do we have blob data type in postgreSQL, if yes in which version. Thank's Gagan Anand

Re: [GENERAL] ODBC Issue

2003-09-09 Thread Relaxin
I realize that you guys are working on this voluntarily. All I asked was where can I go to get some questions answered. scott.marlowe [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, 5 Sep 2003, Relaxin wrote: How do we get someone from PG to respond to the questions in the

[GENERAL] PL/PerlU problems executing other scripts

2003-09-09 Thread Ian Warford
Hi, I have a problem with a PL/PerlU function trying to execute an external perl script. The script is suid to a non-root user and I am executing it in the PL/PerlU function as so : $rc = system /usr/bin/suidperl, -T, /usr/local/bin/script.pl; The script doesn't go off, and the return code

[GENERAL] Help needed in Replicating pgsql

2003-09-09 Thread Hema Sekhar
Hi I am Hemasekhar K.P Iam trying to replicae pgsql on REDHATLinux 8,but the site http://gborg.postgresql.org/genpage?replication_72install. isgiving instructions on REDHATLinux 7,is there any site which gives instructions on how to replicate onREDHATLinux 8,Actually in postgresql.conf

Re: [SQL] [GENERAL] plPGSQL bug in function creation

2003-09-09 Thread George Weaver
I had the same success using 7.3.2 with Cygwin: e=# SELECT functest1('A','B'), functest1(null,'B'), functest2('A','B'), functest2(null,'B'); functest1 | functest1 | functest2 | functest2 ---+---+---+--- A | B | A | B (1 row) e=# select