[GENERAL] EXECUTE USING problem

2011-11-15 Thread Graham
Using PG 9.0.3, I wish to dynamically reference a column in a table passed into a PL/PgSQL function as follows: -- A table with some values. DROP TABLE IF EXISTS table1; CREATE TABLE table1 ( code INT, descr TEXT ); INSERT INTO table1 VALUES ('1','a'); INSERT INTO table1 VALUES ('2

[GENERAL] multiple parameters to an AGGREGATE function

2012-02-03 Thread Graham
#x27;ve searched the online documentation and Googled but haven't found anything. thanks, Graham x -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] NoSQL -vs- SQL

2010-10-12 Thread Graham Leggett
that performed a far simpler job, far faster. Regards, Graham -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Why facebook used mysql ?

2010-11-09 Thread Graham Leggett
On 09 Nov 2010, at 7:16 PM, Gauthier, Dave wrote: Think upgrades This is covered by the GPL license. Once you have released code under the GPL, all derivative code - ie upgrades - have to also be released in source form, under the GPL license. Regards, Graham -- -- Sent via pgsql

Re: [GENERAL] Why facebook used mysql ?

2010-11-09 Thread Graham Leggett
fferent license. Regards, Graham -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Transaction wraparound vacuum synchronicity

2011-03-09 Thread Michael Graham
random value to the freeze_max_age for all the old tables when I start a new month? Or do the same with the freeze_min_age? Perhaps I should just force a vacuum on some of the tables the break it? Cheers, -- Michael Graham -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

[GENERAL] ERROR: syntax error at or near ":"

2013-03-06 Thread Graham Leggett
r ":" LINE 1: update property set value = :'content' where key = 'patricia... ^ Regards, Graham -- smime.p7s Description: S/MIME cryptographic signature

Re: [GENERAL] ERROR: syntax error at or near ":"

2013-03-06 Thread Graham Leggett
PRIMARY KEY, btree (property_id) "property_index" btree (key) > Does the same error occur if you attempt to insert data from a > different text file? I haven't tried. This is a long blob of PEM encoded certificates, so trying to narrow down a troublesome character will be hard.

[GENERAL] Table containing only valid table names

2013-04-26 Thread Michael Graham
p this from happening? I'm not really in the position to have different users for the modification of the table_list and the drops so I don't think I can use different roles. I'm pretty sure I can't do what I need as postgres doesn't support triggers on DDL but may

[GENERAL] Fighting the autovacuumer (to prevent wraparound)

2013-10-03 Thread Michael Graham
p the autovacuumer temporarily (and cancel any on going autovacuum) so that my script can remove the table that the autovacuumer wants to vacuum? I'm on 9.1.4 if it matter. Cheers, -- Michael Graham -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] Fighting the autovacuumer (to prevent wraparound)

2013-10-03 Thread Michael Graham
On Thu, 2013-10-03 at 11:53 -0700, bricklen wrote: > > On Thu, Oct 3, 2013 at 11:48 AM, Michael Graham > wrote: > Hi all, > > We partition the data in postgres in a per-month basis and run > a script > to delete old partition

[GENERAL] Rearranging simple where clauses

2011-05-04 Thread Michael Graham
nd to doing it or is there some deeper reasons? It's not really important I'm just curious. Cheers, -- Michael Graham -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Rearranging simple where clauses

2011-05-04 Thread Michael Graham
s the benefit. But in terms of driving the planner don't we always want to be looking to move all the constants to one side of the expression since the planner seems to like those? -- Michael Graham -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to you

Re: [GENERAL] Rearranging simple where clauses

2011-05-04 Thread Michael Graham
e side of a WHERE-condition operator exactly matches an index, so > you'd need to be looking for places where rearrangement could make > that happen. The reason I never showed you any was because I don't have any I was just curious. But yeah making one side match an index exactly is pr

[GENERAL] Vacuum as "easily obtained" locks

2011-08-03 Thread Michael Graham
s at the end of a table become entirely free and an exclusive table lock can be easily obtained". What does "easily obtained" mean in this context? Would my applications constant polling of the queue mean that the lock could not be easily obtained? Cheers, -- Michael Graham --

Re: [GENERAL] Vacuum as "easily obtained" locks

2011-08-03 Thread Michael Graham
der what circumstances it will be able to return unused space to the OS in when it can't. Cheers, -- Michael Graham -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Vacuum as "easily obtained" locks

2011-08-03 Thread Michael Graham
On Wed, 2011-08-03 at 10:17 -0400, Tom Lane wrote: > Michael Graham writes: > > Would my applications > > constant polling of the queue mean that the lock could not be easily > > obtained? > > Very possible, depending on what duty cycle is involved there. Hm

Re: [GENERAL] Vacuum as "easily obtained" locks

2011-08-03 Thread Michael Graham
uot;traffic.public.logdata5queue" Under those circumstances? Cheers, -- Michael Graham -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] SQL statement logging: picking up strange queries from "pg_catalog"

2010-07-03 Thread Graham Leggett
#x27;29427', $2 = '6' 2010-07-03 23:49:31 SAST LOG: execute : SELECT def.adsrc FROM pg_catalog.pg_class c JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) WHERE c.oid = $1 and a.attnum = $2 AND def.adsrc LIKE '%nextval(%' 2010-07-03 23:49:31 SAST DETAIL: parameters: $1 = '29427', $2 = '6' Regards, Graham -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] SQL statement logging: picking up strange queries from "pg_catalog"

2010-07-03 Thread Graham Leggett
ons are tracked? Specifically tracking when the client connected, and how long the client stayed connected for. Regards, Graham -- -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] unnest and string_to_array on two columns

2011-10-25 Thread Michael Graham
) AS bb ON aa.row_number=bb.row_number AND aa.id=bb.id; So I was wondering if anyone had any better solutions. Thanks, -- Michael Graham -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] postgresql-9.1.1 PQescapeByteaConn() generating incorrectly quoted output.

2011-11-02 Thread Graham Murray
enc); PQfreemem(enc); exit(0); } Running the above program with postgres 9.0 & 9.1 generates the following output. graham@gmdev ~ $ ./byteatest Server version 90101 Encoded string = \x0807060504030201100f0e0d0c0b0a09 graham@gmdev ~ $ ./byteatest Server version 90005 Encoded string = \\x0807060504030201100f0e0d0c0b0a09 smime.p7s Description: S/MIME cryptographic signature

Re: [GENERAL] postgresql-9.1.1 PQescapeByteaConn() generating incorrectly quoted output.

2011-11-05 Thread Graham Murray
On Wed, 2011-11-02 at 18:21 +, Tom Lane wrote: > Graham Murray writes: > > Since upgrading test systems to postgresql 9.1, I am seeing some > inserts > > to bytea fields giving errors such as "ERROR: invalid byte sequence > for > > encoding "UTF8":

Re: [GENERAL] Anyone using pgreplicator?

2004-04-20 Thread Alan Graham
ing it again as a real user. Hope this helps someone else avoid my mistake. Alan Graham On Thu, 2004-04-15 at 22:11, Alan Graham wrote: > Apologies if this is off topic, but I've tried the pgreplicator forums, > and they appear to be dormant. > > I'm trying to get a mul

[GENERAL] Mysql to postgres tools -reviews?

2001-08-30 Thread Graham White
I am looking for feedback from anyone that has moved their data from Mysql to Postgres using the tools in contrib/mysql or any other data porting tools on the net. Did any data get lost in the transfer? Recommendations? Amount of time for transfers? Any feedback would be greatly appreciated. Thank

[GENERAL] Repairing table corruption

2001-09-09 Thread Graham White
We are looking at moving from a Mysql database setup and we understand that table corruption in Postgres is a lot less likely but if it does happen are there built in utilities to repair the tables? Recommended 3rd party products? Thanks GW ---(end of broadcast)-

Re: [GENERAL] Error: Bad Timestamp Format

2001-09-12 Thread Graham Leggett
was doing with "SHOW DATETYPES". What format is the date "2001-09-12 14:14:12.03-04"? ^^-- day > Does pg_dump make a difference? pg_dump seems to be useless - it doesn't dump the whole database (blobs in the DB are mis

Re: [GENERAL] Error: Bad Timestamp Format

2001-09-12 Thread Graham Leggett
rk fine against a 7.0 database). > > Also you might want to look at this message from the archives: > http://archives.postgresql.org/pgsql-jdbc/2001-03/msg00168.php > Which discusses this bug. Thanks - I'll definitely check this out... Regards, Graham -- --

[GENERAL] Postgresql sql query - selecting rows outside a join

2003-12-01 Thread Graham Leggett
more efficient way of doing this? Regards, Graham -- ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] Money data type in PostgreSQL?

2003-12-04 Thread Graham Leggett
oring the figures as a floating point type. When manipulating the numbers, I use Java BigDecimals, which don't lose any precision either, and convert back to bigints to store in the database. YMMV. Regards, Graham -- ---(end of broadcast)--- T

[GENERAL] Problems with Commit ?

1999-01-16 Thread Graham Hemmings
nsert, yet it seems that the selects for the Album Name are failing, causing another entry for the ALBUM to be generated. What makes this particularly confusing is that I do exactly the same thing for the 'ARTISTS' table using the same perl functions - which works just fine! Any ideas? Please! Graham...