[GENERAL] Re: Using different GCC, CFLAGS, CCFLAGS and CPPFLAGS to compile Postgres and PostGIS?

2017-02-01 Thread postgres user
Also can you explain if I built Postgres from source on one platform lets say RHEL_6 and deployed its artifacts like its binaries, libs and share on a CentOS and tried building extensions against Postgres on CentOS are there any dangers of doing that? On Wed, Feb 1, 2017 at 8:34 PM, postgres user

[GENERAL] Using different GCC, CFLAGS, CCFLAGS and CPPFLAGS to compile Postgres and PostGIS?

2017-02-01 Thread postgres user
Hi, I am wondering about this question for a while with no definite answer to it, can someone explain me in detail to clear me out on the following question : What can go wrong or is it acceptable if I build Postgres from source with let's say GCC 4.x.y and some specific CFLAGS, CPPFLAG

[GENERAL] Testing an extension exhaustively?

2017-02-01 Thread postgres user
Hi, If I have the Postgresql server installed on my machine i.e I have all the bins, libs and share directories of the Postgresql and I have the libs and sql's installed for one of the contrib extensions lets say "chkpass", how does one go about testing this extension exhaustively on the server? I

[GENERAL] Making changes to PostgreSQL's configure logic so as to have contrib modules installed in a specific directory and make them use PGXS?

2017-01-31 Thread postgres user
Hi, I want to configure my PostgreSQL installation in such a manner such that the contrib modules of the PostgreSQL distribution are stored in a specific directory and they should use the PGXS extensions management system supported by Postgres, as they are currently packaged along with Postgres

[GENERAL] Re: Building PL/Perl procedural language without --with-perl configure flag

2017-01-15 Thread postgres user
The already installed Postgres edition was built using the same installation procedure as mentioned in the docs, but without the use of --with-perl flag. the point I ask the question is because I want to install PL/Perl as a separate extension as one does with PostGIS and not along with Postgres

[GENERAL] Building PL/Perl procedural language without --with-perl configure flag

2017-01-15 Thread postgres user
Hi, I am trying to build PL/Perl procedural language to my PostgreSQL server installation but I want to do it without passing --with-perl flag to the configure script of PostgreSQL. It would also help if someone can explain the meaning of --with-perl flag in a detailed fashion altogether as it mig

[GENERAL] Active/Active clustering in postgres

2014-11-26 Thread Postgres India
Hi All, I am looking for PostgreSQL active/active clustering and whether PostgreSQL support any form of shared-storage clustering . Is there any methods or tools for implementing active/active clustering on Postgres supported by community or any third party tools. Regards Manmohan

Re: [GENERAL] DBlink, postgres to DB2

2014-10-30 Thread Postgres India
; http://multicorn.org/ > another cool stuff to generalize interconnections > > > Wed, 22 Oct 2014 22:34:06 -0700 от Postgres India : > > Thanks a lot Remi, Merlin and Pavel...I will give it a try. > > On Wed, Oct 22, 2014 at 6:36 AM, Merlin Moncure <https://e.mail.

Re: [GENERAL] DBlink, postgres to DB2

2014-10-22 Thread Postgres India
Thanks a lot Remi, Merlin and Pavel...I will give it a try. On Wed, Oct 22, 2014 at 6:36 AM, Merlin Moncure wrote: > On Wed, Oct 22, 2014 at 5:56 AM, Pavel Stehule > wrote: > > Hi > > > > try to use a Perl implementation https://github.com/davidfetter/DBI-Link > > > > There is a DBD dri

[GENERAL] DBlink, postgres to DB2

2014-10-22 Thread Postgres India
Hi, I am trying to connect DB2 from postgres using dblink, is there any configuration required at DB2 and postgres server. If any command string please provide it. Thanks Manmohan. K

[GENERAL] UDP Overflow / UDP Drops on Standby Postgres Service

2014-01-21 Thread Postgres Question
Postgres General List, I am stumped trying to prevent an overflowing UDP buffer on a standby Postgres service. Any help would be most appreciated. Essentially a UDP buffer associated with the pg_standby process on my localhost interface gradually fills up once I start Postgres until it

[GENERAL] Storing large files in multiple schemas: BLOB or BYTEA

2012-10-10 Thread tigran2-postgres
>Yeah, a pg_dump mode that dumped everything but large objects would be nice. There is option -b for pg_dump which controls whether large objects are dumped or no. The problem is that with option -b it dumps all large objects regardless of what schema you requested it to dump using option -n. Othe

Re: [GENERAL] Storing large files in multiple schemas: BLOB or BYTEA

2012-10-10 Thread tigran2-postgres
Using files stored outside the database creates all sorts of problems. For starters you lose ACID guaranties. I would prefer to keep them in database. We did a lot of experiments with Large Objects and they really worked fine (stored hundreds of LOBs ranging from a few MB up to 1GB). Postgres does a re

Re: [GENERAL] Storing large files in multiple schemas: BLOB or BYTEA

2012-10-10 Thread tigran2-postgres
>Large Objects and bytea are the only ways. > >If you want to pg_dump only certain large objects, that won't work as far as I know (maybe using permissions and a non-superuser can help). > >You absolutely need to pg_dump parts of the database regularly? > >Yours, >Laurenz Albe It is n

[GENERAL] Storing large files in multiple schemas: BLOB or BYTEA

2012-10-10 Thread tigran2-postgres
Hi, I need to store large files (from several MB to 1GB) in Postgres database. The database has multiple schemas. It looks like Postgres has 2 options to store large objects: LOB and BYTEA. However we seem to hit problems with each of these options. 1. LOB. This works almost ideal, can

Re: [GENERAL] Deleting PostGres ID Under Windows XP?

2012-04-28 Thread PostGres
RE/ >> Am I going to regret doing this? > >If you want to keep using Postgres, yes. Search the web Suspicion.. *Confirmed*. Thanks! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/ma

[GENERAL] Deleting PostGres ID Under Windows XP?

2012-04-28 Thread PostGres
Somewhere along the line the install of one of my apps created a userid named "PostGres", I assume in connection with installing the PostGres database manager. Now I no longer have the option of having the system just boot up into my own ID: I have to select my ID from a login s

Re: [GENERAL] Indicating DEFAULT values in INSERT statement

2011-08-09 Thread Postgres User
Good idea but you're right, if the default value is an expression such as a the next serial value, it will need to be executed first. If Execute doesn't return the interpreted value, I don't know of a way to make it work.. On Tue, Aug 9, 2011 at 5:35 PM, Diego Augusto Molina < diegoaugustomol...@

Re: [GENERAL] Indicating DEFAULT values in INSERT statement

2011-08-09 Thread Postgres User
Thanks for the previous posts. I am in fact running 9.0 'nix and am unable to find a way to embed DEFAULT within an expression. I can always rewrite the function to call EXECUTE but that's not a very good solution in this case because many of our db functions are code generated. On Tue, Aug 9, 201

[GENERAL] Indicating DEFAULT values in INSERT statement

2011-08-09 Thread Postgres User
Hi, According to the docs, the DEFAULT keyword lets you explicitly insert a field's default value in an INSERT statement. >From a db function, I'd like to force the use of default when an input parameter is null. This syntax looks correct but fails to compile. Any suggestions? INSERT INTO publ

Re: [GENERAL] pg_largeobject vs pg_toast_XXXX

2011-08-02 Thread bubba postgres
No takers? Some background I've changed my TOAST type from EXTENDED to MAIN. On Thu, Jul 28, 2011 at 10:50 AM, bubba postgres wrote: > > After some changes on my DB I notice that where I used to have a large > pg_toast_X table, I now have a large pg_largeobject table. &

[GENERAL] pg_largeobject vs pg_toast_XXXX

2011-07-28 Thread bubba postgres
After some changes on my DB I notice that where I used to have a large pg_toast_X table, I now have a large pg_largeobject table. Can't find an explanation of the difference between the two, could someone enlighten me?

[GENERAL] Odd performance difference in check constraint : SQL(slow) vs plpgsql(fast)

2011-06-17 Thread bubba postgres
This is the reverse of what I thought I would find. In short my check constraint is extracting the epoch from a start timestamp, and an end timestamp to get the number of seconds difference. It then uses this number to check the array_upper() of an array to make sure it's the proper size The SQL

[GENERAL] Are check constraints always evaluated on UPDATE?

2011-06-17 Thread bubba postgres
Are there any optimizations around check constraints such that they will not be evaluated if constituent columns are not updated? Regards, -JD

[GENERAL] Why are IDLE connections using cpu according to TOP.

2011-06-03 Thread bubba postgres
50 processes: 3 running, 42 sleeping, 5 uninterruptable CPU states: 21.7% user, 0.0% nice, 7.8% system, 46.9% idle, 23.6% iowait Memory: 29G used, 149M free, 13M buffers, 27G cached Swap: PID USERNAME PRI NICE SIZE RES STATE TIME WCPUCPU COMMAND 4779 postgres 200 4383M 573M

[GENERAL] General Postgres performance tips when using ARRAY

2011-05-25 Thread bubba postgres
So, what are the gotcha's around manipulating Arrays in stored procs? It seems reasonable that an array_cat /etc would cause the creation of a new array, but does mutating an existing array also create a copy?

Re: [GENERAL] pg_dump on Hot standby : clarification on how to

2011-05-13 Thread bubba postgres
was more to it than that. On Thu, May 12, 2011 at 5:08 PM, Andrew Sullivan wrote: > On Thu, May 12, 2011 at 11:26:38AM -0700, bubba postgres wrote: > > I would just like to get some clarification from the list on how to do a > > pg_dump on the slave in the face of "canc

[GENERAL] pg_dump on Hot standby : clarification on how to

2011-05-12 Thread bubba postgres
I would just like to get some clarification from the list on how to do a pg_dump on the slave in the face of "canceling statement due to conflict with recovery". The following links seem to indicate that If I start an idle transaction on the master I should be able to do the pg_dump, but I tried th

[GENERAL] Transport Compression (whatever became of that discussion?)

2011-04-19 Thread bubba postgres
In this discussion there was a lot of talk of transport compression in Postgres, (also specifically wondering about JDBC as well) did anything ever come of that discussion? http://postgresql.1045698.n5.nabble.com/Compression-on-SSL-links-td2261205.html

Re: [GENERAL] JDBC Binary transfer of Arrays

2011-04-01 Thread bubba postgres
After trying out the JDBC4 driver in DBCP, I see that Connection.createArray(...) still just creates a big string under the covers. Is that the expected behavior? Am I doing it wrong? On Thu, Mar 31, 2011 at 8:04 PM, bubba postgres wrote: > Hello! > In my current application I am sending

[GENERAL] JDBC Binary transfer of Arrays

2011-03-31 Thread bubba postgres
Hello! In my current application I am sending a lot of data to/from the DB with JDBC, and specifically arrays of Double. (or even Double[][]). Alas, my current implementation I converts everything into a string representation, which blows my memory out of the water and drops my transaction rate way

[GENERAL] Re: why does extract ( HOUR FROM TIMESTAMP '2010-01-01 00:00:00' at time zone 'utc' ) == 16?

2011-03-18 Thread bubba postgres
0-01-01 00:00:00' at time zone 'utc' ) at time zone 'utc' ) does not... Can anyone explain this? On Thu, Mar 17, 2011 at 5:05 PM, bubba postgres wrote: > Is this the correct behavior? It seems like if I specify the utc offset it > should be 0, not 16.. It seems to

[GENERAL] why does extract ( HOUR FROM TIMESTAMP '2010-01-01 00:00:00' at time zone 'utc' ) == 16?

2011-03-17 Thread bubba postgres
Is this the correct behavior? It seems like if I specify the utc offset it should be 0, not 16.. It seems to be the opposite behavior from extract epoch. select extract ( HOUR FROM TIMESTAMP '2010-01-01 00:00:00' ) as defhour, extract ( HOUR FROM TIMESTAMP '2010-01-01 00:00:00' at time zone 'PST'

[GENERAL] Re: Is TimeZone applied with TIMESTAMP WITHOUT TIME ZONE and Extract( EPOCH ...)?

2011-03-17 Thread bubba postgres
ok got it. select EXTRACT( EPOCH FROM '2010-04-01 00:00:00'::TIMESTAMP WITHOUT TIME ZONE at time zone 'utc' ); On Thu, Mar 17, 2011 at 11:32 AM, bubba postgres wrote: > no.. still confused. > I assume it's storing everythign in UTC.. did I need to speci

[GENERAL] Re: Is TimeZone applied with TIMESTAMP WITHOUT TIME ZONE and Extract( EPOCH ...)?

2011-03-17 Thread bubba postgres
no.. still confused. I assume it's storing everythign in UTC.. did I need to specify a timezone when I inserted? On Thu, Mar 17, 2011 at 11:24 AM, bubba postgres wrote: > Looks like a quick search says I need to specify the timezone... > > > On Thu, Mar 17, 2011 at 11:22 A

[GENERAL] Re: Is TimeZone applied with TIMESTAMP WITHOUT TIME ZONE and Extract( EPOCH ...)?

2011-03-17 Thread bubba postgres
Looks like a quick search says I need to specify the timezone... On Thu, Mar 17, 2011 at 11:22 AM, bubba postgres wrote: > > I'm noticing some interesting behavior around timestamp and extract epoch, > and it appears that I'm getting a timezone applied somewhere. > &

[GENERAL] Is TimeZone applied with TIMESTAMP WITHOUT TIME ZONE and Extract( EPOCH ...)?

2011-03-17 Thread bubba postgres
I'm noticing some interesting behavior around timestamp and extract epoch, and it appears that I'm getting a timezone applied somewhere. Specifically, If I do: select EXTRACT( EPOCH FROM '2010-01-31 00:00:00'::TIMESTAMP WITHOUT TIME ZONE ); == 1264924800 select EXTRACT( EPOCH FROM '2010-04-01 00:0

[GENERAL] Anyone use PG with kvm/virtio? Any gotchas or recommended settings?

2011-01-19 Thread bubba postgres
by crashes or restarts of postgres), and we are wondering if that might be the culprit.

[GENERAL] missing chunk number (Bug 5507)

2011-01-16 Thread bubba postgres
I found this link: http://postgresql.1045698.n5.nabble.com/BUG-5507-missing-chunk-number-0-for-toast-value-X-in-pg-toast-X-td2126674.html And am also experiencing the same issue... More anecdotal evidence that this is a bug: We recently(couple days ago) completely recreated the DB, and sta

[GENERAL] Time Series on Postgres (HOWTO?)

2011-01-14 Thread bubba postgres
I've been googling, but haven't found a good answer to what I should do if I want to store time series in Postgres. My current solution is store serialized (compressed) blobs of data. (So for example store 1 day worth of 1 minute samples (~1440 samples) stored as one row in a bytea.

Re: [GENERAL] Restore problem

2010-12-29 Thread Tim Bruce - Postgres
On Wed, December 29, 2010 10:59, John R Pierce wrote: > On 12/29/10 4:34 AM, Leif Biberg Kristensen wrote: >> Back when I used Windows, my favorite editor was EditPlus >> (http://www.editplus.com/). It isn't free, but well worth the 35 bucks. > > other good choices are Notepad++ (free) and my perso

[GENERAL] Abusing Postgres in interesting ways

2010-12-07 Thread bubba postgres
Hello all, I'm creating a data queue on top of postgres and I'm wondering if I've made an incorrect assumption about isolation or synchronization or some similar issue. Every item in the queue is given a unique ID from a sequence. CREATE TABLE data_queue ( sequence_num BIG

[GENERAL] Abusing Postgres in fun ways.

2010-12-07 Thread bubba postgres
I'm creating a data queue on top of postgres and I'm wondering if I've made an incorrect assumption about isolation or synchronization or some similar issue. Every item in the queue is given a unique ID from a sequence. CREATE TABLE data_queue ( sequence_num BIGINT PRIMARY KEY

Re: [GENERAL] Who is locking me?

2010-03-18 Thread Tim Bruce - Postgres
On Thu, March 18, 2010 12:29, Bill Moran wrote: > In response to "Abraham, Danny" : > >> Hi, >> >> >> >> A process hangs forever. >> >> When using this query... >> >> >> >> SELECT pg_stat_get_backend_pid(s.backendid) AS procpid, >> >>pg_stat_get_backend_activity(s.backendid) AS current_que

Re: [GENERAL] Questions on PostGreSQL Authentication mechanism...

2010-02-02 Thread Tim Bruce - Postgres
general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > Since the pg_hba.conf file is located in the /etc path, the pg_read_file command fails with an error of "could not open file "pg_hba.con

Re: [GENERAL] Selecting from table into an array var

2009-12-19 Thread Postgres User
Great call, someone did hose the data. Oddly enough the circular reference caused no problem when running the stand alone recursive SQL (with clause). On Sat, Dec 19, 2009 at 10:41 AM, Merlin Moncure wrote: > On Sat, Dec 19, 2009 at 1:30 PM, Postgres User > wrote: >> >> T

[GENERAL] How to call a function that returns a refcursor ?

2009-12-19 Thread Postgres User
Hi, I have a function that returns a refcursor that I need to call from a second function. In the second function, I'd like to read a column value from each row. However, I'm having a problem accessing the rows of the refcursor. Can anyone point me to a working example of how to pull this off?

Re: [GENERAL] Selecting from table into an array var

2009-12-19 Thread Postgres User
On Sat, Dec 19, 2009 at 6:56 AM, Merlin Moncure wrote: > On Sat, Dec 19, 2009 at 1:05 AM, Postgres User > wrote: >> >> BEGIN >> SELECT array_agg(category_id) INTO cat_list FROM ( >>         WITH RECURSIVE subcategory AS >>                ( >

Re: [GENERAL] Selecting from table into an array var

2009-12-18 Thread Postgres User
On Fri, Dec 18, 2009 at 9:53 PM, Merlin Moncure wrote: > On Fri, Dec 18, 2009 at 11:35 PM, Pavel Stehule > wrote: >> 2009/12/19 Postgres User : >>> Hi, >>> >>> I'm trying to write a very simple function statement to select a >>> single int

[GENERAL] Selecting from table into an array var

2009-12-18 Thread Postgres User
Hi, I'm trying to write a very simple function statement to select a single integer field from a table and save it into an int array. For some reason I can't seem to find the correct syntax: CREATE TABLE sample ( id integer ); and then within a function: my_array int[]; my_array = SELECT A

[GENERAL] How to check status of bug (42804: structure of query does not match error where using RETURN QUERY) ?

2009-12-06 Thread Postgres User
Hi, I've encountered a serious Postgres bug which apparently has a fix that hasn't been released in a patch. How or where can I look up its status? This is a serious bug- it basically renders RETURN QUERY useless in any environment where you don't have the option of dropping an

[GENERAL] Postgres database performance on 6 core Opteron vs 4 core Xeon

2009-11-25 Thread Postgres User
Has anyone seen any performance metrics comparing the Opteron 6-core Istanbul class processor aginst the 4-core Xeon e5500 series processor, esp running a dataase?  Or has anyone compared these 2 processor options before ordering a Postgres server? The 6 core processor should offer a clear edge

[GENERAL] Postgres database performance on 6 core Opteron vs 4 core Xeon

2009-11-25 Thread Postgres User
Has anyone seen any performance metrics comparing the Opteron 6-core Istanbul class processor aginst the 4-core Xeon e5500 series processor, esp running a dataase? Or has anyone compared these 2 processor options before ordering a Postgres server? The 6 core processor should offer a clear edge

Re: [GENERAL] interface for "non-SQL people"

2009-10-09 Thread Tim Bruce - Postgres
On Fri, October 9, 2009 09:06, Andrew Gould wrote: > On Fri, Oct 9, 2009 at 10:15 AM, Joshua D. Drake > wrote: >> On Thu, 2009-10-08 at 19:16 -0600, Scott Marlowe wrote: >>> On Thu, Oct 8, 2009 at 2:22 PM, Merlin Moncure >>> wrote: >>> > >>> > The #1 tool you have at your disposal is the human br

Re: [GENERAL] interface for "non-SQL people"

2009-10-06 Thread Postgres User
EMS SQL Manager has a visual query builder, but it's a commerical product, ie it aint free. On Tue, Oct 6, 2009 at 12:47 PM, pere roca wrote: > > >  hi, >  some nice tool over there to let non-SQL knowing people to construct their > queries? I'm using pgAdmin III but I know some SQL. >  there is

[GENERAL] Composite types and tables - when to use?

2009-10-06 Thread Postgres User
Browsing the docs last night, I realized that I've never taken advantage of Postgres' powerful composite types.  But a question came to mind- in what scenarios should you use a composite type in a table structure?  That is, I can see the benefits of a composiite type insofar as it essent

[GENERAL] Composite types and tables - when to use?

2009-10-06 Thread Postgres User
Browsing the docs last night, I realized that I've never taken advantage of Postgres' powerful composite types. But a question came to mind- in what scenarios should you use a composite type in a table structure? That is, I can see the benefits of a composiite type insofar as it essent

Re: [GENERAL] Using Insert - Default in a condition expression ??

2009-09-29 Thread Postgres User
>> > >> > I'm trying to write an INSERT INTO statement that will use a DEFAULT >> > value when an input parameter is null. >> > >> Neither of my 2 methods are pretty. >> 1) Use a trigger. >> 2) Grab and cast the default value from the information_schema.columns >> view and plug it in. >> >> Another

Re: [GENERAL] Using Insert - Default in a condition expression ??

2009-09-28 Thread Postgres User
>> I'm trying to write an INSERT INTO statement that will use a DEFAULT >> value when an input parameter is null. >> > Neither of my 2 methods are pretty. > 1) Use a trigger. > 2) Grab and cast the default value from the information_schema.columns > view and plug it in. > > Another option is to bui

[GENERAL] Using Insert - Default in a condition expression ??

2009-09-28 Thread Postgres User
Hi, I'm trying to write an INSERT INTO statement that will use a DEFAULT value when an input parameter is null. Here's the function that fails to compile. I tried replacing Coalesce with a Case statement but that fails as well. Note that if you replace the condition with a simple 'Default' it c

[GENERAL] Alternative to temp tables?

2009-09-11 Thread Postgres User
Hi, I have a simple function that returns a set of rows: CREATE OR REPLACE FUNCTION foo() RETURNS SETOF record AS $$ BEGIN RETURN QUERY SELECT * FROM people WHERE last_name = 'jones'; END $$ LANGUAGE 'plpgsql' In a separate function, I call the function and store the results in a temp tabl

Re: [GENERAL] Schema search_path and $user

2009-07-06 Thread Postgres User
Thanks for the link, I wasn't reading the right page(s) in the documentation. On Mon, Jul 6, 2009 at 12:19 PM, Tom Lane wrote: > Postgres User writes: >> In the docs, I see repeated references to $user in the postgresql.conf >> schema search_path setting such as: > &

[GENERAL] Schema search_path and $user

2009-07-06 Thread Postgres User
In the docs, I see repeated references to $user in the postgresql.conf schema search_path setting such as: search_path = '"$user",public' But I don't see any info on the meaning of '$user' here. Is $user some kind of variable within postgresql.conf that refers to the current user? Can it be r

[GENERAL] Maintaining user roles and permissions in Postgres - general question

2009-06-18 Thread Postgres User
Does anyone have a recommendation for maintaining user permissions on a changing database? The lack of an option to grant specific rights to all objects of a given type within a Postgres db obviously places the burden on the administrator to keep roles updated as objects are added and dropped

[GENERAL] aliases for sequences and other DB objects?

2009-06-09 Thread Agoston Postgres
Hi! Is it possible in Postgres to specify aliases for various DB objects, such as tables, views, sequences, etc.? (For now I would like to create them for sequences.) What I mean is something like in Oracle, such as create alias my_sequence_alias for my_sequence; select nextval

[GENERAL] How to get the size of non fixed-length field from system catalog ?

2009-06-08 Thread Postgres User
Hi, I'm writing a small ORM tool and have written a number of queries to retrieve table metadata. One piece of data that I'm having trouble hunting down is the size of a CHAR field. For example, one table has a 'user_id' column of type CHAR(36). But when I look at the pg_attribute and pg_type t

Re: [GENERAL] High I/O writes activity on disks causing images on browser to lag and not load

2009-06-03 Thread Tim Bruce - Postgres
On Wed, June 3, 2009 13:44, Jennifer Trey wrote: > On Wed, Jun 3, 2009 at 10:59 PM, Bill Moran > wrote: > >> In response to Jennifer Trey : >> >> > Hmm, I just noticed the same write behavior on my Windows Xp laptop >> but >> the >> > values was a little less. >> > I even created an DB with one tab

Re: [GENERAL] High I/O writes activity on disks causing images on browser to lag and not load

2009-06-03 Thread Tim Bruce - Postgres
On Wed, June 3, 2009 12:59, Bill Moran wrote: > In response to Jennifer Trey : > >> Hmm, I just noticed the same write behavior on my Windows Xp laptop but >> the >> values was a little less. >> I even created an DB with one table and column and this still happened >> when querying it. > > By "cre

[GENERAL] SQL to return all function parameters- its working

2009-05-29 Thread Postgres User
Based on replies to another post (recommending use of 'generate_series'), I was able to write the following query that returns all paramters of a given function. Only one interesting thing to note- in order to return the proper argument type, I had to use proargtypes[i - 1] when I expected th

Re: [GENERAL] Converting each item in array to a query result row

2009-05-29 Thread Postgres User
Thanks for all the replies. I'm going to post the results of using the recommended approach in another thread. On Fri, May 29, 2009 at 1:18 PM, Adam Ruth wrote: > Good point, I should have specified 8.3.7. > > Just one more reason to anxiously anticipate upgrading to 8.4. > > > > On 30/05/2009,

[GENERAL] Converting each item in array to a query result row

2009-05-29 Thread Postgres User
Hi, I'd writing a query against a function (pg_proc) that contains 2 fields of an array type. Ideally, I'd like to select 1 row from the table, but return a query row for each item in the array. For example, if one row contains the array {"a", "b", "c"} I'd like the query to return 3 rows, one f

Re: [GENERAL] How to speed up the first-time-searching in pgsql?

2009-05-28 Thread Tim Bruce - Postgres
On Thu, May 28, 2009 01:23, Richard Huxton wrote: > zxo102 ouyang wrote: >> Hi there, >> Thanks for your suggestions. I do have an application running on the >> machine >> all the time. In fact, the application keeps writing real-time >> monitoring >> data into the database. Based on my understandi

[GENERAL] How to restore a SQL-ASCII encoded database to a new UTF-8 db?

2009-05-21 Thread Postgres User
Hi, I have a database that was created with SQL-ASCII encoding (unfortunately). I ran pg_restore to load the struct and data into a new database with UTF-8 encoding but no surprise- I'm seeing this error for a number of tables: pg_restore: [archiver (db)] COPY failed: ERROR: invalid byte sequen

Re: [GENERAL] Looking for advice on database encryption

2009-04-16 Thread Tim Bruce - Postgres
On Thu, April 16, 2009 13:20, Bill Moran wrote: > In response to Thomas Kellerer : > >> Bill Moran wrote on 16.04.2009 21:40: >> > The goal here is that if we're going to encrypt the data, it should >> > be encrypted in such a way that if an attacker gets ahold of a dump >> > of the database, they

Re: [GENERAL] PostgreSQL 8.3.4 Solaris x86 compilation issues

2008-11-01 Thread postgres Emanuel CALVO FRANCO
do you just read FAQ_Solaris in the docs. I don't remember at all, but is explain some steps to run with SSL. 2008/11/1, Zdenek Kotala <[EMAIL PROTECTED]>: > Hi, > > It is really strange. Is there any reason why you don't use integrated SSL? > 64bit version is located in /usr/sfw/lib/64 > Try > >

Re: [GENERAL] How to know the password for the user 'postgres'

2008-10-28 Thread Tim Bruce - Postgres
On Tue, October 28, 2008 05:57, Tom Lane wrote: > Sam Mason <[EMAIL PROTECTED]> writes: >> On Tue, Oct 28, 2008 at 10:42:47AM +0100, Thomas wrote: >>> An easy trick I have found to set postgres password: $ sudo passwd >>> postgres, and now you can type a ne

Re: [GENERAL] Replication with slony-I

2008-10-27 Thread postgres Emanuel CALVO FRANCO
http://slony.blogspot.com/ sorry is in spanish, but is an exelent resource, i hope it will be useful reggards 2008/10/27 Abdul Rahman <[EMAIL PROTECTED]>: > May any one support step by step procedure for the replication with slony-I > in windows xp. > > -- Emanuel Calvo Franco Sysc

Re: [GENERAL] How to free disk space

2008-10-21 Thread postgres Emanuel CALVO FRANCO
erforming a VACCUM FULL? It locks the database for several > hours, and that is not a solution. > > I guess a backup-restore would do the work but, isn't there a better way to > do this without shutting down postgres? > > Thanks in advandce. > > --

Re: [GENERAL] databases list to file

2008-10-14 Thread postgres Emanuel CALVO FRANCO
is from a shell script to be executed without human >> intervention >> >> I guess something like: >> >> su postgres -c 'psql ...whatever > /tmp/my_databases.txt' >> >> but I don't know exactly to what extent I can format the output of this

Re: [GENERAL] Opteron vs. Xeon performance differences

2008-10-10 Thread postgres Emanuel CALVO FRANCO
n the new. In that way could be a configuration kernel. do you make a test of hardware instead postgres?? if the hard give you better numbers, so postgres have the problem. 2008/10/10 Shane Ambler <[EMAIL PROTECTED]>: > Bart Grantham wrote: >> >> a long story short: we&#

Re: [GENERAL] Opteron vs. Xeon performance differences

2008-10-10 Thread postgres Emanuel CALVO FRANCO
How do you manage the wal in both servers? The version kernel is the same in both? Runs the same services? Do you make some test with Posgresql only in both servers? If the problem is the inter-CPU, i know you can specified the number of processors do you want to run dedicated to one process. 200

Re: [GENERAL] [HACKERS] PostgreSQL future ideas

2008-09-29 Thread postgres Emanuel CALVO FRANCO
2008/9/27 Douglas McNaught <[EMAIL PROTECTED]>: > On Sat, Sep 27, 2008 at 12:13 PM, Mark Mielke <[EMAIL PROTECTED]> wrote: >> If >> some parts of PostgreSQL are not performance bottlenecks, and they are >> extremely complicated to write in C, and very easy to write in something >> else common and s

Re: [GENERAL] Restoring a database from a file system snapshot

2008-08-27 Thread postgres Emanuel CALVO FRANCO
Sorry Alvaro, i sent to you the message ;P Is the same way (from snapshot) that use Mysql on ZFS. IF you don't change anything in the database, why it don't works? Then you restart the service with the same path. The problem it will be that you need to stop postgres BEFORE snapshot.

[GENERAL] Max array size

2008-06-30 Thread Postgres User
Hi, Does anyone know the maximum number of elements allowed in a one-dimensional array? It looks like my script may add at least a couple million, not sure if it will hit a limit... -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http:

Re: [GENERAL] postgres crash when select a record

2008-05-15 Thread mailtolouis2020-postgres
Hello Pavel, Thanks for the info, this is very great help. Regard Louis - Original Message From: Pavel Stehule <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Cc: Postgres Sent: Thursday, May 15, 2008 4:43:36 AM Subject: Re: [GENERAL] postgres crash when select a record Hello 200

Re: [GENERAL] postgres crash when select a record

2008-05-14 Thread mailtolouis2020-postgres
Hello, Yes, I deleted that record, and now my backup is working fine! Thanks But why this problem came out? Is there anyway to trace it down and how it happen? Or is it a bug of postgres? Regards Louis - Original Message From: Pavel Stehule <[EMAIL PROTECTED]> To: [EMAIL PROTECT

Re: [GENERAL] postgres crash when select a record

2008-05-14 Thread mailtolouis2020-postgres
No, I didn't run the query when the DB is in recovering. I did that after database system is ready - Original Message From: Glyn Astill <[EMAIL PROTECTED]> To: [EMAIL PROTECTED]; Postgres Sent: Wednesday, May 14, 2008 6:07:23 PM Subject: Re: [GENERAL] postgres crash wh

[GENERAL] postgres crash when select a record

2008-05-14 Thread mailtolouis2020-postgres
Hello, I wish some could help me on this. I got a table which has 100500 records, when I try to query this particular record select * from cs_sr_mthly_rtn where mthly_rtn_id = 61609; Postgres crash, and show this errors: server closed the connection unexpectedly  This probably means the server

Re: [GENERAL] Scripting function definitions as SQL?

2008-05-11 Thread Postgres User
bert depesz lubaczewski <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 11:28:37AM -0700, Postgres User wrote: > > Unfortunately I didn't see a way to tell pg_dump to dump only objects > > of a specific type, like functions or sequences. It requires > > additi

Re: [GENERAL] Scripting function definitions as SQL?

2008-05-11 Thread Postgres User
an Oosterhout <[EMAIL PROTECTED]> wrote: > On Sun, May 11, 2008 at 06:12:40AM -0700, Postgres User wrote: > > Has anyone written a function that scripts out all the functions in a > > database as full SQL statements (Create Function.) > > > > I found the below SQ

[GENERAL] Scripting function definitions as SQL?

2008-05-11 Thread Postgres User
Has anyone written a function that scripts out all the functions in a database as full SQL statements (Create Function.) I found the below SQL will return all the fields needed to build a SQL statement, but it would take some work to combine the field values correctly to get the right format.

[GENERAL] Duplicated primary key id happen

2008-05-09 Thread mailtolouis2020-postgres
Hello, I got a problem to restore a database, because there is a problem in my production database, which not suppose to happen like that, but it happen, not sure is a postgres bug or not. I got a table call CS_SR_MTHLY_RTN which has MTHLY_RTN_ID (INTEGER) as a primary key. So the MTHLY_RTN_ID

[GENERAL] Duplicated primary key id happen

2008-05-09 Thread mailtolouis2020-postgres
Hello, I got a problem to restore a database, because there is a problem in my production database, which not suppose to happen like that, but it happen, not sure is a postgres bug or not. I got a table call CS_SR_MTHLY_RTN which has MTHLY_RTN_ID (INTEGER) as a primary key. So the MTHLY_RTN_ID

[GENERAL] timestamp problem

2008-04-02 Thread mailtolouis2020-postgres
when I switch to product database, it show error that this procedure not exit, it is looking for a procedure with TIMSTAMPTZ, why ? Is there somewhere in postgres can set not look for TIMESTAMPTZ, but TIMESTAMP? Regards Louis

Re: [GENERAL] Trigger transactions

2008-03-21 Thread Postgres User
Question answered- needed to move Insert statement before Update in main function. On Fri, Mar 21, 2008 at 6:42 PM, Postgres User <[EMAIL PROTECTED]> wrote: > if a function includes this SQL: > > Update Table1 Set field_1 = 'ab'; > Insert Table2(field_2) VALUES(

[GENERAL] Trigger transactions

2008-03-21 Thread Postgres User
if a function includes this SQL: Update Table1 Set field_1 = 'ab'; Insert Table2(field_2) VALUES('cd'); and I create an update trigger on Table1: Create Trigger Table1_Update AFTER Update On Table1 FOR EACH ROW: Select * From Table2 will the Select statement in the trigger see the

Re: [GENERAL] Regex query not using index

2008-02-20 Thread Postgres User
value that Postgres will ignore when processing the query? This syntax results in a seq scan: WHERE fielda = Coalesce(param, fielda) because it applies only to non-nulls Is there another way to write this- perhaps using your array syntax on an empty array? Basically I'd PG to ignore the condi

Re: [GENERAL] Regex query not using index

2008-02-20 Thread Postgres User
ition equivalent to many OR conditions when using basic comparison operators: select * from table1 where name ~ '.*' '^Smith$' |^Jones$': And this works very well- except for the seq scan instead of an index scan On Feb 20, 2008 2:31 AM, Tino Wildenhain <[EMAIL P

Re: [GENERAL] Regex query not using index

2008-02-20 Thread Postgres User
ignored by the optimizer- or am i missing something On Feb 19, 2008 9:45 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Postgres User" <[EMAIL PROTECTED]> writes: > > Yes that works, but the whole point of the exercise is replace many OR > > statements with 1 regex expr

Re: [GENERAL] Regex query not using index

2008-02-19 Thread Postgres User
by the way, your example works fine unless it's a null value or empty string unfortunately, postgres isn't smart enough to know that the when p_param below is null, that the WHERE condition can be ignored select * from table where name in (Coalesce(p_param, name)) which is the same as

  1   2   >