Re: [GENERAL] regarding IN clause

2005-05-18 Thread Greg Stark
Surabhi Ahuja [EMAIL PROTECTED] writes: why is it not searching the indexes(index scan)? and how can i make such a query much faster? 130 values out of 3,000 is 4.3% of the table. If you have narrow records with, say, 20 per page that would mean reading most of the pages out of the table.

[GENERAL] Executing Dynamic DDL

2005-05-18 Thread Samer Abukhait
i am trying to execute an 'alter table' statement dynamically.. it seems that execute only works with DML.. is there any way to execute DDL statements?? here is what i am trying to do: create or replace function em.process_table ( p_table varchar) returns

Re: [GENERAL] Logs

2005-05-18 Thread Richard Huxton
Hrishikesh Deshmukh wrote: Hi All, Where can i find more information on user actions, i.e. say a user logins in and does some querying via sql and then uses perl/c/c++ language to do some more querying. So how does postgresql keep track of user actions in a sequential order? PostgreSQL doesn't

[GENERAL] postgres 7.4 array count

2005-05-18 Thread Margus Roo
Hello. Is there any good solution to count elements from array field? Reg, Margusja ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[GENERAL] Storing/Using Passwords

2005-05-18 Thread William Shatner
Hello, I am using PostgreSQL 8.0 as a data repository for a Java based system and I now want to add users to my java program with usernames and passwords. Is their an encrypted password field I can use in a User Table to store passwords or what would be the best way to approach this? The

Re: [GENERAL] postgres 7.4 array count

2005-05-18 Thread Sean Davis
Does array_dims give you the answer you like? http://www.postgresql.org/docs/8.0/interactive/functions- array.html#ARRAY-OPERATORS-TABLE Sean On May 18, 2005, at 4:35 AM, Margus Roo wrote: Hello. Is there any good solution to count elements from array field? Reg, Margusja

[GENERAL] plpython multi row return workaround

2005-05-18 Thread Sim Zacks
I've seen other people with this question and today it hit me full force because I need to expand a string and then return all the results. the problem is that string parsing is best done in python, but as far as I could figure out, python only allows 1 result returned. The problem: I have data

[GENERAL] double quotes inside VBA string ?

2005-05-18 Thread Zlatko Matić
Hello. I have a problem when working with MS Access/PostgreSQL. Namely, as PostgreSQL syntax uses doble quotes for table names and field names,when I write it as a string of a pass-through query or Command text of ADO Command object it looks like:"select * from public."Customers""and

Re: [GENERAL] Executing Dynamic DDL

2005-05-18 Thread Michael Fuhr
On Wed, May 18, 2005 at 09:07:55AM +0200, Samer Abukhait wrote: i am trying to execute an 'alter table' statement dynamically.. it seems that execute only works with DML.. A simple example shows that EXECUTE does indeed work with DDL: CREATE TABLE foo (col1 integer); CREATE FUNCTION

Re: [GENERAL] double quotes inside VBA string ?

2005-05-18 Thread Pascual De Ruvo
If you need to use a double quote inside a VB string, you have to write two double quotes (double double quotes!), so your command will be something like: select * from public.Customers On 5/18/05, Zlatko Mati [EMAIL PROTECTED] wrote: Hello. I have a problem when working with MS

[GENERAL] ceci n'est pas un btree

2005-05-18 Thread David Parker
As part of a nightly build process we are building an 8.0.1 database, creating a schema, etc. Intermittently we are getting the error ERROR: index "xyz" is not a btree In the archives I found a post from Tom http://archives.postgresql.org/pgsql-admin/2005-05/msg00103.phpthat suggested

[GENERAL] 8.0.3 RPMs for PPC

2005-05-18 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I've just built RPMs for PPC platform on Fedora Core 3.92 (Test release for FC 4). It will on main FTP site in an hour. We'll continue to build packages for ppc from now on. They will be under:

Re: [GENERAL] Newbie question on RULEs .. or .. bug ?

2005-05-18 Thread Leif Jensen
Hello Tom, Thank you for the enlightment, I think I understand what you say. There are however a few things I'm not sure about still. The update seems to work as I would expect when I include one or more in there where clause from the primary key. If I have a field not in the primary key

Re: [GENERAL] [JDBC] Storing/Using Passwords

2005-05-18 Thread Scott Marlowe
On Wed, 2005-05-18 at 05:36, William Shatner wrote: Hello, I am using PostgreSQL 8.0 as a data repository for a Java based system and I now want to add users to my java program with usernames and passwords. Is their an encrypted password field I can use in a User Table to store passwords

Re: [GENERAL] CSV delim quoting differences PgCOPY, Excel etc...

2005-05-18 Thread Edmund Bacon
[EMAIL PROTECTED] (Jerry Sievers) writes: Hello. Anyway, I am often enough having to load Pg databases using SQL COPY from CSV output written by Excel, that I've had to write a script to change the quoting behavior from Excel's putting double quotes around a field having embedded delim

[GENERAL] Count and Results together

2005-05-18 Thread Jan Sunavec
Hi Is possible use SELECT NUM_ROWS, a, b, c FROM blabla WHERE x =id; I mean it's much more faster than SELECT a, b, c FROM blabla WHERE x =id; and then SELECT count(*) FROM blabla WHERE x =id; John ---(end of broadcast)--- TIP 6: Have you

[GENERAL] TABLEs to VIEWs with Perl

2005-05-18 Thread Justin Tocci
#!/usr/bin/perl -wuse strict;# This program turns text files with TABLE definitions#      clipped from PGADMIN into VIEWs with a pre-pended 't'.## All VIEWs get a full set of rules and permissions and assume the first column is the primary key.# # To use:# put this script into a text file and save

[GENERAL] Newbie question

2005-05-18 Thread Hugo
hi, is it possible to schedule the execution of an sql stored procedure in postgress on linux? thanks Hugo ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Newbie question

2005-05-18 Thread Dann Corbit
Sure. Just set up psql with a SQL script containing your task using a chron job. The psql utility will accept a command file as a parameter. PostgreSQL has functions rather than stored procedures, but it works out about the same. You could also put a bunch of SQL commands that you want to run

Re: [GENERAL] Count and Results together

2005-05-18 Thread Sean Davis
On May 18, 2005, at 3:07 AM, Jan Sunavec wrote: Hi Is possible use SELECT NUM_ROWS, a, b, c FROM blabla WHERE x =id; I mean it's much more faster than SELECT a, b, c FROM blabla WHERE x =id; and then SELECT count(*) FROM blabla WHERE x =id; Can you do this on the client side? What

Re: [GENERAL] Newbie question

2005-05-18 Thread Vlad
IMHO cron would be the best for that... is it possible to schedule the execution of an sql stored procedure in postgress on linux? -- Vlad ---(end of broadcast)--- TIP 6: Have you searched our list archives?

[GENERAL] OLAP with PostgreSQL

2005-05-18 Thread Adem HUR
Hi, I am a student and I want to create Multidimensional Data Cubes -OLAP- with PostgreSQL. Is it possible? I have a relational database on PostgreSQL and it contains many records. I want to create an OLAP Cube from the records. And want to drill-down and drill-up operations on this cube. But

Re: [GENERAL] Newbie question

2005-05-18 Thread Csaba Nagy
Dear Hugo, It is possible using cron and psql. Just man cron on unix if you're not already familiar with that. The command line you should use is something like: psql [connection options] -f sql_commands_file.sql Also man psql for the options you can use... Starting the procedure should be

Re: [GENERAL] Newbie question

2005-05-18 Thread Kaloyan Iliev Iliev
Hi Hugo, Yes, it is possible. Just write an outer perl script(in example), which to call this stored procedure. Then put in the cron to call whis perl script. As Far As I Know there isn't other way. Kaloyan Iliev Hugo wrote: hi, is it possible to schedule the execution of an sql stored

Re: [GENERAL] double quotes inside VBA string ?

2005-05-18 Thread Jeff Eckermann
Zlatko Matiæ [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. I have a problem when working with MS Access/PostgreSQL. Namely, as PostgreSQL syntax uses doble quotes for table names and field names, when I write it as a string of a pass-through query or Command text of ADO

Re: [GENERAL] Newbie question

2005-05-18 Thread Hugo
thanks all for your help, I'll try your suggestions regards Hugo 2005/5/18, Kaloyan Iliev Iliev [EMAIL PROTECTED]: Hi Hugo, Yes, it is possible. Just write an outer perl script(in example), which to call this stored procedure. Then put in the cron to call whis perl script. As Far As I

Re: [GENERAL] Newbie question

2005-05-18 Thread Bricklen Anderson
Hugo wrote: hi, is it possible to schedule the execution of an sql stored procedure in postgress on linux? thanks Hugo cron job: eg. Sat 2:30am 30 2 * * Sat psql -d dbname -c select your_func() -- ___ This e-mail may be privileged and/or confidential, and the sender

Re: [GENERAL] OLAP with PostgreSQL

2005-05-18 Thread Scott Marlowe
On Wed, 2005-05-18 at 12:46, Adem HUR wrote: Hi, I am a student and I want to create Multidimensional Data Cubes -OLAP- with PostgreSQL. Is it possible? I have a relational database on PostgreSQL and it contains many records. I want to create an OLAP Cube from the records. And want to

Re: [GENERAL] Distinguishing between connections in pg_hba.conf

2005-05-18 Thread Adam Witney
On 17/5/05 2:59 pm, Scott Marlowe [EMAIL PROTECTED] wrote: On Tue, 2005-05-17 at 05:08, Stephane Bortzmeyer wrote: On Mon, May 16, 2005 at 03:31:27PM -0500, Scott Marlowe [EMAIL PROTECTED] wrote a message of 48 lines which said: but how do you assign it so that requests from apache

[GENERAL] Image storage questions

2005-05-18 Thread Ed L.
If I store images as blobs in pgsql, will they be loaded into the db shared memory cache as they are retrieved? What are the tradeoffs of storing images as bytea vs blobs? Thanks. Ed ---(end of broadcast)--- TIP 3: if posting/reading through

Re: [GENERAL] Image storage questions

2005-05-18 Thread Ed L.
On Wednesday May 18 2005 2:10 pm, Ed L. wrote: What are the tradeoffs of storing images as bytea vs blobs? Actually, I see you can't store/retrieve blobs remotely, which is a non-starter. So the remaining choices seem to be bytea vs. storing only metadata and keeping the images elsewhere

Re: [GENERAL] Image storage questions

2005-05-18 Thread Joshua D. Drake
Ed L. wrote: On Wednesday May 18 2005 2:10 pm, Ed L. wrote: What are the tradeoffs of storing images as bytea vs blobs? Actually, I see you can't store/retrieve blobs remotely, which is a non-starter. Sure you can. We do it all the time. What language are you using that doesn't let you do it?

Re: [GENERAL] Image storage questions

2005-05-18 Thread Ed L.
On Wednesday May 18 2005 2:40 pm, Joshua D. Drake wrote: Ed L. wrote: On Wednesday May 18 2005 2:10 pm, Ed L. wrote: What are the tradeoffs of storing images as bytea vs blobs? Actually, I see you can't store/retrieve blobs remotely, which is a non-starter. Sure you can. We do it all

Re: [GENERAL] Image storage questions

2005-05-18 Thread Joshua D. Drake
I was following this: http://www.postgresql.org/files/documentation/books/aw_pgsql/node96.html Because large objects use the local filesystem, users connecting over a network cannot use lo_import or lo_export(). Confirmed using psql. What api/language are you using? Is this possible to do

Re: [GENERAL] Image storage questions

2005-05-18 Thread Joshua D. Drake
Can you or anyone share your experiences with using blobs as opposed to bytea or storing externally? I'm particularly interested to know if loading a large number of images is going to crowd my DB cache? Large Objects stream (for lack of a better term) to the client in 8k? chunks so it

Re: [GENERAL] Image storage questions

2005-05-18 Thread Ed L.
On Wednesday May 18 2005 2:57 pm, Joshua D. Drake wrote: What api/language are you using? Is this possible to do through DBI? If you don't use lo_import/lo_export, how do you insert/retrieve images? Pointers to docs are welcomed! I have done it via PHP and I can definately insert with perl

[GENERAL] numeric precision when raising one numeric to another.

2005-05-18 Thread Scott Marlowe
It appears from checking the output of exponentiation of one numeric to another, the output is actually in floating point. Is this normal and / or expected? Now, given that create table test2 (i1 numeric(20,0), i2 numeric(20,0)); insert into test values (123456789012345,123456789012345); select

Re: [GENERAL] Image storage questions

2005-05-18 Thread Alvaro Herrera
On Wed, May 18, 2005 at 02:49:40PM -0600, Ed L. wrote: I was following this: http://www.postgresql.org/files/documentation/books/aw_pgsql/node96.html Because large objects use the local filesystem, users connecting over a network cannot use lo_import or lo_export(). So you use lo_write.

Re: [GENERAL] numeric precision when raising one numeric to another.

2005-05-18 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: It appears from checking the output of exponentiation of one numeric to another, the output is actually in floating point. Is this normal and / or expected? Yes, seeing that the only ^ operator we have is float8. regression=# \do ^

Re: [GENERAL] numeric precision when raising one numeric to

2005-05-18 Thread Scott Marlowe
On Wed, 2005-05-18 at 16:42, Tom Lane wrote: Scott Marlowe [EMAIL PROTECTED] writes: It appears from checking the output of exponentiation of one numeric to another, the output is actually in floating point. Is this normal and / or expected? Yes, seeing that the only ^ operator we have

Re: [GENERAL] numeric precision when raising one numeric to another.

2005-05-18 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: Considering that the SQL spec says the result of multiplication of exact numeric types is exact numeric types of precision S1+S2, and exponentiation is nothing more than repeated multiplication, ... not when the exponent is non-integral.

Re: [GENERAL] Newbie question

2005-05-18 Thread Geoffrey
Kaloyan Iliev Iliev wrote: Hi Hugo, Yes, it is possible. Just write an outer perl script(in example), which to call this stored procedure. Then put in the cron to call whis perl script. As Far As I Know there isn't other way. Depending on whether you want to schedule a procedure on a regular

[GENERAL] 8.0.3 build error on Mac OS X 10.4

2005-05-18 Thread Matthew Hixson
8.0.3 does not build for me on Mac OS X 10.4. Anyone else seeing this error, and will it be fixed in the next release? Thanks, -M@ gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith - Wendif-labels -fno-strict-aliasing -DFRONTEND -I. -I../../../src/ include

Re: [GENERAL] 8.0.3 build error on Mac OS X 10.4

2005-05-18 Thread Michael Glaesemann
On May 19, 2005, at 10:27 AM, Matthew Hixson wrote: 8.0.3 does not build for me on Mac OS X 10.4. Anyone else seeing this error, and will it be fixed in the next release? I just built 8.0.3 on Mac OS X 10.4.1 just fine. I installed bison-1.875 (simple ./configure, make, sudo make install)

Re: [GENERAL] 8.0.3 build error on Mac OS X 10.4

2005-05-18 Thread Michael Glaesemann
On May 19, 2005, at 10:48 AM, Michael Glaesemann wrote: On May 19, 2005, at 10:27 AM, Matthew Hixson wrote: 8.0.3 does not build for me on Mac OS X 10.4. Anyone else seeing this error, and will it be fixed in the next release? I just built 8.0.3 on Mac OS X 10.4.1 just fine. I installed

Re: [GENERAL] numeric precision when raising one numeric to another.

2005-05-18 Thread John Burger
Considering that the SQL spec says the result of multiplication of exact numeric types is exact numeric types of precision S1+S2, and exponentiation is nothing more than repeated multiplication, ... not when the exponent is non-integral. For one thing. For another, I believe the standard C

Re: [GENERAL] 8.0.3 build error on Mac OS X 10.4

2005-05-18 Thread Tom Lane
Michael Glaesemann [EMAIL PROTECTED] writes: On May 19, 2005, at 10:27 AM, Matthew Hixson wrote: 8.0.3 does not build for me on Mac OS X 10.4. Anyone else seeing this error, and will it be fixed in the next release? I just built 8.0.3 on Mac OS X 10.4.1 just fine. IIRC this isn't the

Re: [GENERAL] numeric precision when raising one numeric to another.

2005-05-18 Thread Alvaro Herrera
On Wed, May 18, 2005 at 10:46:50PM -0400, John Burger wrote: Considering that the SQL spec says the result of multiplication of exact numeric types is exact numeric types of precision S1+S2, and exponentiation is nothing more than repeated multiplication, ... not when the exponent is

[GENERAL] Is postgresql 8.xx jdbc support SCROLL_SENSITIVE?

2005-05-18 Thread Hengki Suhartoyo
Hi, all I have problem with my jdbc program, my java program can't use TYPE_SCROLL_SENSITIVE. But I need Sensitive scrollable result. Can anybody help me? this is my java test program, /* * testRS.java * * Created on May 16, 2005, 9:48 PM */ import java.sql.*; public class testRS {

Re: [GENERAL] Is postgresql 8.xx jdbc support SCROLL_SENSITIVE?

2005-05-18 Thread Kris Jurka
On Wed, 18 May 2005, Hengki Suhartoyo wrote: I have problem with my jdbc program, I need Sensitive scrollable result. Postgresql only supports insensitive cursors and ResultSets. Your only option is to reissue the query to pick up any changes. Kris Jurka ---(end

Re: [GENERAL] 8.0.3 build error on Mac OS X 10.4

2005-05-18 Thread Matthew Hixson
On May 18, 2005, at 8:21 PM, Tom Lane wrote: Michael Glaesemann [EMAIL PROTECTED] writes: On May 19, 2005, at 10:27 AM, Matthew Hixson wrote: 8.0.3 does not build for me on Mac OS X 10.4. Anyone else seeing this error, and will it be fixed in the next release? I just built 8.0.3 on Mac OS X