Re: [GENERAL] coalesce and nvl question

2004-06-23 Thread Doug McNaught
Simon Windsor <[EMAIL PROTECTED]> writes: > Hi > > I understand that null and '' are different, and MySQL and Oracle > functions are confusing, but my question was not about replacing NULL > but replacing Empty strings. These are handled in MySQL/Oracle by the > same functions that do NULL checks.

Re: [GENERAL] insert with select as value

2004-06-23 Thread Bruno Wolff III
On Wed, Jun 23, 2004 at 13:42:12 +0200, Milos Prudek <[EMAIL PROTECTED]> wrote: > >If your purpose in doing this is just to generate unique keys, you should > >be using sequences instead. > > I would need 150 separate sequences, because each idsection needs its > own, independent sequence of id

Re: [GENERAL] coalesce and nvl question

2004-06-23 Thread Simon Windsor
Hi I understand that null and '' are different, and MySQL and Oracle functions are confusing, but my question was not about replacing NULL but replacing Empty strings. These are handled in MySQL/Oracle by the same functions that do NULL checks. Is there a standard function in Postgres that replac

Re: [GENERAL] coalesce and nvl question

2004-06-23 Thread Mike Mascari
Simon Windsor wrote: Hi Is there a standard postgres method of replacing empty strings. In Oracle, nvl handles nulls and empty strings, as does ifnull() in MySQL, but with postgres coalesce only handles null strings. If, not is the best solution to create a plpgsql function, ie CREATE FUNCTION isEm

Re: [GENERAL] simultaneous use of JDBC and libpq

2004-06-23 Thread alltest1
For everyone who replied to my question, thank you very much!! Bob ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] User Privileges using dblink

2004-06-23 Thread DeJuan Jackson
I've never used dblink, but why don't you store your connection strings in a table. CREATE connections (id SERIAL PRIMARY KEY, conn_str text NOT NULL); The create a function as SECURITY DEFINER that takes id as a parameter and returns the conn_str CREATE OR REPLACE FUNCTION get_connection(INT) R

Re: [GENERAL] RHEL 2.1 rpms for 7.4.2

2004-06-23 Thread Joshua D. Drake
Dave Cramer wrote: Agreed, But people who buy RHAS2.1 in my experience are quite adamant about using RHAS2.1 packages. Well they are RHAS 2.1 packages :) Just rename them. There is almost zero difference from a PostgreSQL perspective between 7.3 and AS/ES 2.1. Sincerely, Joshua D. Drake You can ge

Re: [GENERAL] psql

2004-06-23 Thread Daniel Verite
Richard Huxton writes > Daniel Verite wrote: > > You probably need to purge the postgresql-client package > > as well, so that your shell will find /usr/local/pgsql/bin/psql > > which should be the one that you installed from source. > > I believe there is a "backports" repository with u

Re: [GENERAL] RHEL 2.1 rpms for 7.4.2

2004-06-23 Thread Dave Cramer
Agreed, But people who buy RHAS2.1 in my experience are quite adamant about using RHAS2.1 packages. You can get it to build but you have to go in and manually remove some lines from the spec file. Dave On Wed, 2004-06-23 at 12:26, Joshua D. Drake wrote: > Dave Cramer wrote: > > rpmbuild is broke

Re: [GENERAL] RHEL 2.1 rpms for 7.4.2

2004-06-23 Thread Joshua D. Drake
Dave Cramer wrote: rpmbuild is broken on RH AS2.1, it can't handle nested ifs The 7.3 packages should work. Dave On Fri, 2004-06-18 at 21:45, Tom Lane wrote: Hadley Willan <[EMAIL PROTECTED]> writes: Does anybody know where I can find Redhat Enterprise Linux 2.1 versions of the latest Postgresql

Re: [GENERAL] simultaneous use of JDBC and libpq

2004-06-23 Thread Csaba Nagy
Yes, it is safe. The JDBC and the libpq app will share nothing between each other, so there can not be any threading issues between them. You can only have thread safety issues inside the same application which uses multiple threads sharing resources between each other. Cheers, Csaba. On Wed, 200

Re: [GENERAL] RHEL 2.1 rpms for 7.4.2

2004-06-23 Thread Dave Cramer
rpmbuild is broken on RH AS2.1, it can't handle nested ifs Dave On Fri, 2004-06-18 at 21:45, Tom Lane wrote: > Hadley Willan <[EMAIL PROTECTED]> writes: > > Does anybody know where I can find Redhat Enterprise Linux 2.1 > > versions of the latest Postgresql release? > > Your best bet might be

[GENERAL] coalesce and nvl question

2004-06-23 Thread Simon Windsor
Hi Is there a standard postgres method of replacing empty strings. In Oracle, nvl handles nulls and empty strings, as does ifnull() in MySQL, but with postgres coalesce only handles null strings. If, not is the best solution to create a plpgsql function, ie CREATE FUNCTION isEmpty (character va

Re: [GENERAL] FW: problems with installing postgres

2004-06-23 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: > Now, why de_DE isn't valid, I don't know. We've seen reports of this kind before --- it appears that the locale support in OS X 10.2.* is rather incomplete. I don't recall having heard any similar reports concerning 10.3 though, so maybe the best answe

Re: [GENERAL] simultaneous use of JDBC and libpq

2004-06-23 Thread Richard Huxton
alltest1 wrote: (B> Hi, (B> (B> I am wondering if it is thread-safe to use both JDBC and libpq (B> simultaneously. (B> (B> On a Linux, JDBC is used by Tomcat and libpq is used by a client (B> software written in C language. So JDBC and libpq are used by two (B> different programs. (B> If

Re: [GENERAL] setting autocommit off in pgsql

2004-06-23 Thread Tom Lane
"Antony Paul" <[EMAIL PROTECTED]> writes: > How to set autocommit off. In psql, \set AUTOCOMMIT off regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.p

Re: [GENERAL] psql

2004-06-23 Thread Tom Lane
Carlos Ojea Castro <[EMAIL PROTECTED]> writes: > I get this message: > debian-ojea:/home/carlos# psql buques_db > /usr/lib/postgresql/bin/psql: relocation error: > /usr/local/lib/libreadline.so.4: undefined symbol: BC > > I made 'apt-get install postgresql', but it was an old version, so I > purge

Re: [GENERAL] User Privileges using dblink

2004-06-23 Thread Alvaro Herrera
On Wed, Jun 23, 2004 at 09:03:37AM +0200, "Kreißl, Karsten" wrote: > But, under this conditions we must specify username and password > (without encryption!) in the view definition. Every user can read > this information using pgadmin or other tools. It's very simple ! In > our environment the r

Re: [GENERAL] timestamp without time zone format

2004-06-23 Thread Richard Huxton
Antony Paul wrote: Hi all What is the last value in a column of data type timestamp without time zone. A sample data is 2004-06-22 18:07:00.486027. What does 486027 mean Milliseconds or seconds since midnight or something else ? It's fractional seconds, but your clock is unlikely to be that a

[GENERAL] simultaneous use of JDBC and libpq

2004-06-23 Thread alltest1
Hi, (B (BI am wondering if it is thread-safe to use both JDBC and libpq (Bsimultaneously. (B (BOn a Linux, JDBC is used by Tomcat and libpq is used by a client (Bsoftware written in C language. So JDBC and libpq are used by two (Bdifferent programs. (BIf the same row in the same table is up

Re: [pgadmin-support] [GENERAL] Building pgadmin on Fedora core 2

2004-06-23 Thread Joe Conway
Adam H. Pendleton wrote: Joe Conway wrote: | Scot L. Harris wrote: |> Running Fedora Core 2 trying to build pgadmin3 from source. |> |> Build wxWindows from sources. Appeared to build and install no problem. |> |> But when building pgadmin get the following error as it tries to build |> pgadmin3.

Re: [pgadmin-support] [GENERAL] Building pgadmin on Fedora core 2

2004-06-23 Thread Scot L. Harris
On Wed, 2004-06-23 at 09:56, Adam H. Pendleton wrote: > Would it be better for us to put a patch into our wxWindows tree for > this, rather than patching gtk? Do we really want to maintain a gtk > patch as well? Also, I've built pgAdmin3 on a fresh FC2 without having > to patch anything, which m

[GENERAL] timestamp without time zone format

2004-06-23 Thread Antony Paul
Hi all What is the last value in a column of data type timestamp without time zone. A sample data is 2004-06-22 18:07:00.486027. What does 486027 mean Milliseconds or seconds since midnight or something else ? Antony Paul ---(end of broadcast)

Re: [GENERAL] psql

2004-06-23 Thread Richard Huxton
Daniel Verite wrote: You probably need to purge the postgresql-client package as well, so that your shell will find /usr/local/pgsql/bin/psql which should be the one that you installed from source. I believe there is a "backports" repository with up-to-date versions you can just apt-get though. An

Re: [GENERAL] insert with select as value

2004-06-23 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Milos Prudek <[EMAIL PROTECTED]> writes: >> If your purpose in doing this is just to generate unique keys, you should >> be using sequences instead. > I would need 150 separate sequences, because each idsection needs its > own, independent sequence of idthread. Wh

Re: [GENERAL] psql

2004-06-23 Thread Daniel Verite
Carlos Ojea Castro writes > >>/usr/lib/postgresql/bin/psql: relocation error: The location suggests it's the psql from the postgresql-client debian package. > debian-ojea:/home/carlos# dpkg -s postgresql > Package: postgresql > Status: purge ok not-installed > Priority: optional > Secti

Re: [GENERAL] Logging duration of batch runs

2004-06-23 Thread Richard Huxton
Christian Kratzer wrote: Hi, I have a stored procedure run periodically that assign accounting records to their respective customers based on username and other criteria. It also does all kinds of validation work on the accounting records. I would have liked to have the procedure log start and st

Re: [GENERAL] Logging duration of batch runs

2004-06-23 Thread Christian Kratzer
Hi, j On Wed, 23 Jun 2004, Martijn van Oosterhout wrote: On Wed, Jun 23, 2004 at 12:49:19PM +0200, Christian Kratzer wrote: Hi, I have a stored procedure run periodically that assign accounting records to their respective customers based on username and other criteria. It also does all kinds of val

Re: [GENERAL] insert with select as value

2004-06-23 Thread Milos Prudek
If your purpose in doing this is just to generate unique keys, you should be using sequences instead. I would need 150 separate sequences, because each idsection needs its own, independent sequence of idthread. Note that you probably want to lock the table before doing this or two transactions ru

Re: [GENERAL] Logging duration of batch runs

2004-06-23 Thread Martijn van Oosterhout
On Wed, Jun 23, 2004 at 12:49:19PM +0200, Christian Kratzer wrote: > Hi, > > I have a stored procedure run periodically that assign accounting records > to their respective customers based on username and other criteria. > It also does all kinds of validation work on the accounting records. > >

Re: [GENERAL] Do we need more emphasis on backup?

2004-06-23 Thread Jim Seymour
Tom Lane <[EMAIL PROTECTED]> wrote: > [snip] > > We do need to point out that you're only as reliable as your last > backup. I'm not sure exactly where to say this. [snip] > Hmph. Backups are for mitigation against a catastrophic failure destroying or corrupting main storage. And even then:

[GENERAL] Logging duration of batch runs

2004-06-23 Thread Christian Kratzer
Hi, I have a stored procedure run periodically that assign accounting records to their respective customers based on username and other criteria. It also does all kinds of validation work on the accounting records. I would have liked to have the procedure log start and stop times using RAISE NOT