[HACKERS] Can I determine the server name from PGresult?

2004-07-23 Thread Tony Reina
I have some libraries that serve as libpq wrappers. One function has the PGresult structure pointer passed to it. I'd like to be able to determine the host name from within the function, but I don't have the PGconn pointer to use PQhost(). Is there any workaround to this? Can I somehow pass

Re: [HACKERS] New COPY commands in libpq

2004-05-01 Thread Tony Reina
I'm a bit rusty on C++ string mashing, but surely sizeof() is not the correct way to determine the number of bytes presently stored in a variable-length string? * PQputCopyEnd(conn, msg); Yes, I've had several people mention this and that did the trick. Thanks to all that replied.

Re: [HACKERS] New COPY commands in libpq

2004-05-01 Thread Tony Reina
You might try porting your code to libpqxx, which is C++-native and should make large swathes of this sort of code unnecessary. I've seriously considered it (along with the npgsql library), but am not really sure as to what the advantage(s) would be considering that (with the corrections

[HACKERS] New COPY commands in libpq

2004-04-30 Thread Tony Reina
I read in the manual that the libpq functions PQputline(conn, cmd) and PQendcopy(conn) have been deprecated and that PQputCopyData(conn, cmd, sizeof(cmd)) and PQputCopyEnd(conn, msg) are the replacements. I'm trying to convert a program that works just fine with the old functions. I assume I'm

[HACKERS] pgmex, a MATLAB interface for PostgreSQL

2004-04-01 Thread Tony Reina
DerTech LLC has developed a MATLAB interface for PostgreSQL. It's essentially mex wrappers for the functions in libpq. We're releasing it for free with source code included. Here's the website link: http://www.dertech.com/neurodb/pgmex.html Could this be added to the related projects page?

Re: [HACKERS] pgmex, a MATLAB interface for PostgreSQL

2004-04-01 Thread Tony Reina
Last link was wrong. Here's the correct one. http://www.dertech.com/pgmex/pgmex.html ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])

[HACKERS] Why is pg_dump using INSERTs instead of COPYs?

2004-03-31 Thread Tony Reina
I've got a database running PostgreSQL 7.4.2 on Fedora Linux. In the past, pg_dump would dump database backups using COPY to restore the data. This time it appears that it has individual INSERTs for each tuple. Perhaps I'm missing this in the latest documentation, but I thought COPY was the

Re: [HACKERS] Connecting to Postgres

2003-12-28 Thread Tony Reina
In postgresql.conf the first entry should be something like 'tcpip'. Set it to 'true'. That's the equivalent of the postmaster -D. HTH, -Tony [EMAIL PROTECTED] (Nailah Ogeer) wrote in message news:[EMAIL PROTECTED]... How do you connect to postgres if it is running on a different machine. I

Re: [HACKERS] Inheritance a burden?

2002-07-22 Thread Tony Reina
At 02:17 PM 7/20/02 +0900, Curt Sampson wrote: Have you tried it using the standard relational method of doing this? (I.e., you put the common fields in one table, and the extra fields in other tables, along with a foreign key relating the extra fields back to the main table.) That would more

Re: [HACKERS] Planner very slow on same query to slightly

2002-07-18 Thread Tony Reina
(cost=100105115.88..100105115.93 rows=2 width=5) - Sort (cost=100105115.88..100105115.88 rows=19 width=5) - Seq Scan on center_out_cell (cost=1.00..100105115.47 rows=19 width=5) EXPLAIN db02=# -Tony At 09:47 PM 7/17/02 -0400, Tom Lane wrote: [EMAIL PROTECTED] (Tony Reina

[HACKERS] Planner very slow on same query to slightly different tables

2002-07-17 Thread Tony Reina
I'm using Postgres 7.2.1 on a dual-Athlon running RedHat 7.3bigmem with 2 Gig of RAM and a 240 Gig RAID 5 (3ware IDE RAID). I just did a 'vacuum analyze' on the database, however the same query to two similar tables is coming up quite different. The two tables only differ in that one

Re: [HACKERS] Problem compiling PostgreSQL 7.2 on IRIX 6.5.15f

2002-03-23 Thread Tony Reina
[EMAIL PROTECTED] (Luis Alberto Amigo Navarro) wrote in message news:005901c1d17a$4d7b0e10$[EMAIL PROTECTED]... cc-1070 cc: ERROR File = xact.c, Line = 587 The indicated type is incomplete. struct timeval delay; struct timeval must be defined on your

[HACKERS] Anyone have a SQL code for cumulative F distribution function?

2002-03-15 Thread Tony Reina
I know it's probably a long shot, but has anyone coded statistical distributions as functions in PostgreSQL? Specifically, I'm looking for a function to calculate the cumulative F distribution. By the way, I know that I can do /df at the psql command line to list the available functions. Is

[HACKERS] Re: 7.1.3, IRIX 6.5 and gcc

2001-08-28 Thread Tony Reina
[EMAIL PROTECTED] (Bruno Mattarollo) wrote in message news:[EMAIL PROTECTED]... Hello Thanks Peter! That solved the problem and I could get postgresql 7.1.3 to compile. Actually it works :) It seems that for my needs now, this GCC is enough... At least I could compile postgresql, python,

[HACKERS] Re: CREATEDB Where ??

2001-08-17 Thread Tony Reina
Peter Moscatt [EMAIL PROTECTED] wrote in message news:4x9f7.126086$[EMAIL PROTECTED]... I am pretty new to PostgreSQL so please bare with me :-) When issuing the CREATEDB MyDb then creating some tables with CREATE TABLE, I then go back and do a search for the file I have just created

[HACKERS] Is there a way to drop and restore an index?

2001-08-01 Thread Tony Reina
I recall seeing a message by Tom Lane stating that dropping and re-creating a primary index may speed up db performance. Is there a SQL command that will do this? My current method is to use pg_dump -s to dump out the schema. Then I go through and cut out everything but the CREATE INDEX lines.

[HACKERS] Does/Can PG store administrative statistics?

2001-07-23 Thread Tony Reina
I'd like to have statistics on when my database was last backed up or vacuumed. Currently, I'm implementing this by using simple shell scripts that write a date stamp to ascii files. I was wondering whether this is or could be a feature added to Postgres? For example, could one of the pg_*

[HACKERS] Shared memory for RH Linux 7.1

2001-05-24 Thread Tony Reina
In the past, I had to change the RedHat Linux kernel so that the shared memory was set to something much higher than the default (which I think was about 32 MBytes). It seems that this is no longer necessary in RH 7.1 (kernel 2.4). Can someone confirm this? -Tony ---(end

[HACKERS] Re: Detecting readline in configure

2001-05-21 Thread Tony Reina
[EMAIL PROTECTED] (Peter Eisentraut) wrote in message news:[EMAIL PROTECTED]... Every once in a while some user complains that the cursor keys don't work anymore in psql. There has even been one case where a major vendor has shipped binaries without readline support. While we keep telling