[GENERAL] bdr.bdr_part_by_node_names does not remove node from bdr.bdr_nodes table

2015-04-08 Thread Dennis
I have removed a node from a three node bdr cluster using bdr.bdr_part_by_node_names() however I am still seeing the removed node in the bdr.bdr_nodes table (it’s status is ‘r’.) Will the removed node entry in the bdr.bdr_nodes table be automatically removed eventually or should I delete the

Re: [GENERAL] bdr.bdr_part_by_node_names does not remove node from bdr.bdr_nodes table

2015-04-08 Thread Dennis
I need to make a correct to the status of the removed node. The removed node’s status is ‘k’ not ‘r’ in the bdr.bdr_nodes table. > On Apr 8, 2015, at 10:05 AM, Dennis wrote: > > I have removed a node from a three node bdr cluster using > bdr.bdr_part_by_node_names() howeve

[GENERAL] Can a bdr enabled server belong to more than one bdr group?

2015-04-09 Thread Dennis
Can a server instance that has a db in one existing bdr group add that same db to a different/new bdr group so that the db belongs to two different bdr groups at the same time? e.g. node 1, db_x, bdr_group (node 1, node 2) node 2, db_x, bdr_group (node 1, node 2) AND bdr_group(node 2, node 3) n

[GENERAL] monitoring bdr nodes

2015-04-16 Thread Dennis
I need some clarification on how to monitor BDR nodes. In particular determining replication lag. As an example, I have a two node cluster with nodes ‘A’ and ‘B’.I need to be able to look at node ‘B’ and determine if it is lagging behind node ‘A’, by interrogating node ‘B’ only. From

Re: [GENERAL] monitoring bdr nodes

2015-04-20 Thread Dennis
node, and figure out a way to send that status back to the VIP manager in a way it can act on it. Any suggestions on how to accomplish that would be appreciated. Dennis > On Apr 20, 2015, at 7:25 AM, Craig Ringer wrote: > > On 16 April 2015 at 23:58, Dennis wrote: >&

[GENERAL] BDR table level replication questions

2015-05-14 Thread Dennis
Hello, I am trying to setup table level replication with BDR 0.9.0 but I am running into some errors. I believe I must be missing a step or two in the process. I currently have a two node group that I want to build. 1) On node1 I have a database built with the tables I want to replicate;

Re: [GENERAL] BDR table level replication questions

2015-05-15 Thread Dennis
On node1: apimgtdb=# SELECT * FROM bdr.bdr_nodes apimgtdb-# ; node_sysid | node_timeline | node_dboid | node_status | node_name | node_local_dsn | node_init_from_dsn -+---++--

Re: [GENERAL] BDR table level replication questions

2015-05-15 Thread Dennis
correct? > On May 15, 2015, at 8:07 AM, Dennis wrote: > > On node1: > > apimgtdb=# SELECT * FROM bdr.bdr_nodes > apimgtdb-# ; > node_sysid | node_timeline | node_dboid | node_status | node_name | >

[GENERAL] psql remote shell command

2016-06-02 Thread Dennis
Is it possible to execute command in on system the is hosting postgresql remotely using psql or other mechanism? I know I can use \! in psql but that executes the commands on the host where I am running psql from. Also, is it possible for a postgres login/user to stop or restart a running post

Re: [GENERAL] psql remote shell command

2016-06-02 Thread Dennis
Wow, thanks for all the feedback. The question about whether a superuser could do something like this came up at the office today in the context of security issues and handing out superuser to the application users (not necessarily to the accounts/roles that would be used from the applications

[GENERAL] JSON path wild cards?

2015-11-23 Thread Dennis
Is there a way to specify a wild card in a json path? For example I have the following json doc: [ {“a”:1,”b”: [ { “x”: 7,”y”:8,”z”:9} ] }, {“a”:2,”b”: [ { “x”: 4,”y”:5,”z”:6} ] }, … ] How do I write a select clause that can return the values for all b x values something like [{b:x}] that wou

Re: [GENERAL] JSON path wild cards?

2015-11-23 Thread Dennis
jsd; Note: In my real world problem I have WHERE clause in the CTW statement using the @> operator so the CTE can be more selective against the entire set of jsonb doc’s in the containing table. > > On Nov 23, 2015, at 10:39 PM, Dennis wrote: > > Is there a way to specify a wild c

Re: [GENERAL] loading data into cluster - can I daisy-chain streaming replication?

2015-12-02 Thread Dennis
load that logical dump into B which would then replicate the data to C. Dennis > On Dec 2, 2015, at 7:24 PM, Florin Andrei wrote: > > I have an old production instance, let's call it A, that I need to > decommission soon. > > I've created a pair of new instances, B

[GENERAL] query does not return after increasing range in 'between' clause

2014-08-27 Thread Dennis
Hi, I am having bad luck with a query that should return zero rows but actually never returns (completes execution.) When I broaden the ‘between’ clause range from " period.orderno between 1447 and 1450" to " period.orderno between 1446 and 1450” the query plan changes and the query never compl

Re: [GENERAL] query does not return after increasing range in 'between' clause

2014-08-27 Thread Dennis
, 2014, at 1:18 PM, Adrian Klaver wrote: > On 08/27/2014 11:02 AM, Dennis wrote: >> Hi, I am having bad luck with a query that should return zero rows but >> actually never returns (completes execution.) >> > > And the query is :) ? > > > -- > Adrian Klaver > adrian.kla...@aklaver.com >

Re: [GENERAL] Optimal checkpoint_setting

2014-10-09 Thread Dennis
Hi, a little off the general topic but I am just wondering if the “tar -cf - pgdata | wc -c” trick can be used as general trick to pre-warm the cache? Thanks. On Oct 9, 2014, at 10:55 AM, Jeff Janes wrote: > On Thu, Oct 9, 2014 at 3:52 AM, pinker wrote: > Hello All, > I have a brand new machi

Re: [GENERAL] Debugging Postgres?

2013-08-16 Thread Dennis
tcpdump and/or wireshark will help with detecting network issues. Wireshark is a little easier to grok if you are not used to doing packet dumps. http://www.wireshark.org/ Dennis From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jayadevan M

Re: [GENERAL] Dump Database

2014-03-17 Thread Dennis
What does the shell command: pwd show when run immediately after you issue a su postgres command? You may want to try su - postgres to ensure you are in the postgres users home directory. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jos

Re: [GENERAL] How to list installed pl languages

2011-11-10 Thread Dennis
: Thursday, November 10, 2011 7:07 AM To: Dennis Ryan Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] How to list installed pl languages On Wed, Nov 09, 2011 at 10:58:01PM -0600, Dennis Ryan wrote: > Is there a way to list the installed pl languages for a database > and/or server c

[GENERAL] What is the best way to force character data to upper case

2012-02-03 Thread Dennis
I am wondering what the best way is to force character data to a specific case, like upper case for example. Is a trigger or rule the only option? Would a check constraint be better or faster than using rules or triggers, knowing that a check constraint puts the onus back on the client code to en

[GENERAL] Geographical redundancy

2006-12-28 Thread Dennis
Is there any feasible way to achieve geographical redundancy of postgresql database? Say you have a website which uses PG on the backend to read/write data and you want to have the website running on 2 separate servers distributed geographically and have the data synchronize somehow over the in

Re: [GENERAL] Geographical redundancy

2007-01-02 Thread Dennis
on? - how much throughput latency do you have between sites? - how much downtime is acceptable in switching sites? On Dec 26, 2006, at 11:41 PM, Dennis wrote: > Is there any feasible way to achieve geographical redundancy of > postgresql database? > > Say you have a website which uses

Re: [GENERAL] Geographical redundancy

2007-01-02 Thread Dennis
er. In case of a problem, start up postgres at the other site and have your app reconnect. This will be slow. It will eat up your bandwidth. It will add complexity. But it won't loose data. On Dec 29, 2006, at 2:38 PM, Dennis wrote: > - Yes, both sites have to be online and changing d

Re: [GENERAL] Geographical redundancy

2007-01-03 Thread Dennis
occur), I am ok with that. Ben <[EMAIL PROTECTED]> wrote: On Sat, 30 Dec 2006, Dennis wrote: > I was thinking of maybe just having 2nd location receive a PG dump (full > or incremental) every so often (an hour to 6 hours) and if the main > location fails majorly, restore the PG c

[GENERAL] Cleanly cancel a query.

2001-06-08 Thread Dennis
If I have a database running, and I see that there is a postmaster process taking 99.9% cpu. ie, a very large insert query. Is there a way to cleanly shut down that query from the client or admin side? -Thanks ---(end of broadcast)--- TIP 4: D

[GENERAL] PG-9.3.6, unable to "drop role because some objects depend on it"

2015-04-13 Thread Dennis Jenkins
I am attempting to remove a "role" from Postgresql-9.3.6. I've already reassigned ownership for the role's tables, functions, sequences, types, views, etc... However, I am still unable to remove the role. Postgresql reports that "8 objects in the database 'postgres'" depend on this role. How do

Re: [GENERAL] PG-9.3.6, unable to "drop role because some objects depend on it"

2015-04-13 Thread Dennis Jenkins
Apologies for the typo of your name in my last post, Tom. On Mon, Apr 13, 2015 at 12:16 PM, Dennis Jenkins < dennis.jenkins...@gmail.com> wrote: > Doh. I found my answer. Tome posted it years ago.. > http://www.postgresql.org/message-id/18994.1325874...@sss.pgh.pa.us > > I

Re: [GENERAL] PG-9.3.6, unable to "drop role because some objects depend on it"

2015-04-13 Thread Dennis Jenkins
on, Apr 13, 2015 at 12:05 PM, Dennis Jenkins < dennis.jenkins...@gmail.com> wrote: > I am attempting to remove a "role" from Postgresql-9.3.6. I've already > reassigned ownership for the role's tables, functions, sequences, types, > views, etc... However, I am

Re: [GENERAL] Allowing postgresql to accept 0xff syntax for data types that it makes sense for?

2015-05-22 Thread Dennis Jenkins
On Fri, May 22, 2015 at 10:02 AM, Tom Lane wrote: > Alban Hertroys writes: > > On 22 May 2015 at 04:46, Bill Moran wrote: > >> With all that being said, if I were to build a patch, would it be likely > >> to be accepted into core? > > How feasible would it be to write a network proxy, like pg_b

[GENERAL] Timestamp from an OID?

2007-09-12 Thread Dennis Muhlestein
he primary key on the table. The server version 8.1.4 Thanks Dennis ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Timestamp from an OID?

2007-09-12 Thread Dennis Muhlestein
A. Kretschmer wrote: am Wed, dem 12.09.2007, um 15:41:44 +0200 mailte A. Kretschmer folgendes: am Wed, dem 12.09.2007, um 7:32:45 -0600 mailte Dennis Muhlestein folgendes: I've been passively collecting data for a few months. I realized, after a while, that I never added a timestamp c

[GENERAL] pg_dump (8.1.9) does not output copy statements

2007-09-26 Thread Matthew Dennis
Maybe I'm just missing something but I can't seem to get pg_dump to output copy statements. Regardless of the -d / --inserts flag it always outputs insert statements. The doc says that pg_dump will output copy statements by default and will only output insert statements with the -d / --inserts fl

Re: [GENERAL] pg_dump (8.1.9) does not output copy statements

2007-09-27 Thread Matthew Dennis
All of them On 9/26/07, Tom Lane <[EMAIL PROTECTED]> wrote: > > Jan de Visser <[EMAIL PROTECTED]> writes: > > In my world two identical pilot errors within a short timeframe are > indicat= > > ive=20 > > of a bad interface. > > Yeah, it's inconsistent. How many people's dump scripts do you want t

[GENERAL] How can I easily and effectively support (language) translation of column values?

2007-10-27 Thread Dennis Brakhane
--- Function Scan on foo (cost=0.00..15.00 rows=5 width=36) (actual time=2588.982..3088.498 rows=1 loops=1) Filter: (id = 1) Total runtime: 3100.398 ms (3 rows) which obviosly is intolerable. So, do I have to

[GENERAL] How can I easily and effectively support (language) translation of column values?

2007-10-29 Thread Dennis Brakhane
ntolerable. So, do I have to bite the bullet and use the ugly "COALESCE/JOIN" statements everywhere or is there a better way? Any help is appreciated. Thanks in advance, Dennis ---(end of broadcast)--- TIP 6: explain analyze is your friend

[GENERAL] Cybercluster

2007-11-02 Thread Dennis Muhlestein
I saw the announcement for a multi-master replication system on the Announcement list. What are your thoughts on this product? Has anyone tried it? The cybercluster link: http://www.postgresql.at/english/downloads_e.html -Dennis ---(end of broadcast

[GENERAL] 8.3 release notes

2007-12-03 Thread Matthew Dennis
The release notes seem to be in two places, with slightly different information. The page Google sends back for most 8.3 queries http://www.postgresql.org/docs/8.3/static/release-8-3.html and the one you get from the PostgreSQL beta program link http://developer.postgresql.org/pgdocs/postgres/rel

[GENERAL] aggregate and order by

2007-12-06 Thread Matthew Dennis
I want to create an aggregate that will give the average velocity (sum of distance traveled / sum of elapsed time) from position and timestamps. example: create table data(position integer, pos_time timestamp, trip_id integer); insert into data values(1, "time x", 1); insert into data values(2,

Re: [GENERAL] Creating Aggregate functions in PLpgSQL

2007-12-11 Thread Matthew Dennis
On 12/11/07, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > > Is it possible to create aggregate functions using pl/pgsql? Yes, the sfunc and ffunc can be functions written in plpgsql. If not possible in plpgsql, is there any other way to create these types of > functions? Yes, but I don't k

[GENERAL] insert into t1 (delete from t0 returning *)

2007-12-17 Thread Matthew Dennis
in 8.3beta3 create table t0(c1 int); create table t1(c1 int); insert into t0 values (1); insert into t0 values (2); insert into t0 values (3); If I execute "delete from t0 returning *" it deletes the rows and returns the deleted rows. I could insert all those rows into t1 by doing "insert into

[GENERAL] Can a stored procedure that creates a temp table be declared STABLE?

2008-01-07 Thread Dennis Brakhane
Hello, I need to write a stored procedure that does look something like this: CREATE FUNCTION foo() RETURNS SETOF BIGINT LANGUAGE plpgsql AS $$ DECLARE result RECORD; BEGIN EXECUTE 'CREATE TEMP TABLE foo (id int,...)'; -- Insert something into foo depending on contents of the database

[GENERAL] Can a stored procedure that creates a temp table be declared STABLE?

2008-01-08 Thread Dennis Brakhane
Hello, I need to write a stored procedure that does look something like this: CREATE FUNCTION foo() RETURNS SETOF BIGINT LANGUAGE plpgsql AS $$ DECLARE result RECORD; BEGIN EXECUTE 'CREATE TEMP TABLE foo (id int,...)'; -- Insert something into foo depending on contents of the data

[GENERAL] aggregate hash function

2008-01-30 Thread Matthew Dennis
I'm in need of an aggregate hash function. Something like "select md5_agg(someTextColumn) from (select someTextColumn from someTable order by someOrderingColumn)". I know that there is an existing MD5 function, but it is not an aggregate. I have thought about writing a "concat" aggregate functio

Re: [GENERAL] aggregate hash function

2008-01-30 Thread Matthew Dennis
On Jan 30, 2008 4:40 PM, Vyacheslav Kalinin <[EMAIL PROTECTED]> wrote: > Most implementations of md5 internally consist of 3 functions: md5_init - > which initializes internal context, md5_update - which accepts portions of > data and processes them and md5_final - which finalizes the hash and > r

[GENERAL] Wrong starting value of sequences after doing pg_dump

2010-10-08 Thread Dennis Gearon
GCC gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5) 4.4.3, 64-bit Dennis Gearon Signature Warning It is always a good idea to learn from your own mistakes. It is usually a better idea to learn from others’ mistakes, so you do not have to make them yourself. from '

[GENERAL] select count(*) status these days

2010-10-18 Thread Dennis Gearon
r, (Love postgres otherwise). Is this still true? Is there any architectural way to speed it up? I'd actually like to run it every 2-60 seconds to update a counter on a page for the marketing guy, (which for once, is me :-) Dennis Gearon Signature Warning It is alwa

[GENERAL] help with design of the 'COUNT(*) in separate table schema

2010-10-20 Thread Dennis Gearon
NULL; END; ' LANGUAGE plpgsql; Wouldn't something like this need row-locking (SELECT for UPDATE) in order to serialize the execution of all triggers? Dennis Gearon Signature Warning It is always a good idea to learn from your own mistakes. It is usually a better

Re: [GENERAL] The first dedicated PostgreSQL forum

2010-11-13 Thread Dennis Gearon
that database types are conservative by nature, almost as much as accountants. But a little change is good now and then ;-) Dennis Gearon From: Guillaume Lelarge To: r...@iol.ie Cc: Elliot Chance , pgsql-general@postgresql.org Subject: Re: The first dedicated PostgreSQL forum Message-ID

Re: [GENERAL] uuid, COMB uuid, distributed farms

2011-01-02 Thread Dennis Gearon
ef-498e87a3e4b3 fa597e9c-ae35-461e-b15f-498e87a3e4b7 f3c46abf-a6b0-4c9c-b22d-498e87a3e4bb fc868307-d1b1-4253-91d7-498e87a3e4bf b79679a9-4359-42a1-bf46-498e87a3e4c3 d91bf8cb-e3be-4446-be73-498e87a3e4c7 bec9e0a1-cd85-4f0c-b35b-498e87a3e4cc 0e0ea724-e145-4932-b0df-498e87a3e4d0 30ab3e05-26e3-44af-a82f-498e87a3

Re: [GENERAL] uuid, COMB uuid, distributed farms

2011-01-02 Thread Dennis Gearon
Good catch! The article is: http://www.informit.com/articles/printerfriendly.aspx?p=25862 Dennis Gearon Signature Warning It is always a good idea to learn from your own mistakes. It is usually a better idea to learn from others’ mistakes, so you do not have to make them

[GENERAL] UUID column as pimrary key?

2011-01-04 Thread Dennis Gearon
, but never explicitly says that's how it's stored. Nor does it use one of the nice, blue headered tables for UUID (or ENUM) showing storage and other attributes as it does for numeric, character,boolean, date/time, binary, monetary, geometric, or network types. Dennis Gearon Si

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Dennis Gearon
arehousing/map reducing arena before I'd consider THAT. And there's 'flavors' of Postgres that will do that, anyway. Dennis Gearon Signature Warning It is always a good idea to learn from your own mistakes. It is usually a better idea to learn from

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread dennis jenkins
On Wed, Jan 5, 2011 at 1:03 PM, Bill Moran wrote: > > But the point (that you are trying to sidestep) is that the UUID namespace > is finite, so therefore you WILL hit a problem with conflicts at some point. > Just because that point is larger than most people have to concern themselves > with isn

Re: [GENERAL] UUID column as pimrary key?

2011-01-06 Thread Dennis Gearon
st tested, theory based practices. They just make the tech world a better place with some of the most reliable, best supported OSS out there.' And you guys and gals ARE that description. Dennis Gearon Signature Warning It is always a good idea to learn from your own mis

[GENERAL] Postgresql-8.4.6, 64bit, Solaris 10u9, dtrace

2011-01-28 Thread dennis jenkins
Hello Everyone, My goal is to install a 64-bit build of the latest Postgresql 8.4 (not ready for 9.0 yet) onto a Solaris 10u9 server (Intel chips, X4270), with dtrace support. Postgresql compiles just fine when configured with "--disable-dtrace". Attempting to compile when configured with "-

Re: [GENERAL] Postgresql-8.4.6, 64bit, Solaris 10u9, dtrace

2011-01-31 Thread dennis jenkins
On Fri, Jan 28, 2011 at 1:19 PM, dennis jenkins wrote: > Hello Everyone, > >    My goal is to install a 64-bit build of the latest Postgresql 8.4 > (not ready for 9.0 yet) onto a Solaris 10u9 server (Intel chips, > X4270), with dtrace support. > ".../no-dtrace-postgres

Re: [GENERAL] finding bogus UTF-8

2011-02-10 Thread dennis jenkins
I'm working on a project to convert a large database form SQL_ASCII to UTF-8. I am using this procedure: 1) pg_dump the SQL_ASCII database to an SQL text file. 2) Run through a small (efficient) C program that logs each line that contains ANY "unclean" ASCII text. 3) Parse that log with a small p

Re: [GENERAL] finding bogus UTF-8

2011-02-10 Thread dennis jenkins
On Thu, Feb 10, 2011 at 1:02 PM, Scott Ribe wrote: > I know that I have at least one instance of a varchar that is not valid > UTF-8, imported from a source with errors (AMA CPT files, actually) before > PG's checking was as stringent as it is today. Can anybody suggest a query to > find such v

Re: [GENERAL] finding bogus UTF-8

2011-02-10 Thread dennis jenkins
> > If you are interested, I can email to you the C and Perl source. > > It runs like this: > > # time pg_restore /db-dumps/some_ascii_pgdump.bin | ./ascii-tester | > ./bad-ascii-report.pl > unclean-ascii.rpt http://www.ecoligames.com/~djenkins/pgsql/ Disclaimer: I offer NO warranty. Use at your

Re: [GENERAL] Weird problems with C extension and bytea as input type

2011-03-23 Thread dennis jenkins
On Wed, Mar 23, 2011 at 5:08 AM, Adrian Schreyer wrote: > > you are right, it returns a char *. > > The prototype: > > char *function(bytea *b); > > The actual C++ function looks roughly like this > > extern "C" > char *function(bytea *b) > { >   string ism; >   [...] >   return ism.c_str(); > } >

[GENERAL] Function Syntax Help

2014-06-26 Thread Dennis Ryan
I having trouble with correct syntax to get this trigger function to compile. I have tried every combination of removing the ‘;’ characters but the function will not compile. Can someone tell me what I am doing wrong, I am stumped. I will be adding addition when clauses the case statement once

Re: [GENERAL] Petition: Treat #!... shebangs as comments

2014-07-18 Thread Dennis Jenkins
On Fri, Jul 18, 2014 at 10:16 AM, Andrew Pennebaker < andrew.penneba...@gmail.com> wrote: > Could we please have the PostgreSQL lexer treat #!... on the first line of > a file as a comment? This would enable .psql scripts to be run with > dot-slash notation preferred by many unix users: > > ./scri

Re: [GENERAL] "soft lockup" in kernel

2013-07-05 Thread Dennis Jenkins
On Fri, Jul 5, 2013 at 7:00 AM, Stuart Ford wrote: > Dear community > > Twice today our PG 9.1 server has caused a "soft lockup", with a kernel > message like this: > > [1813775.496127] BUG: soft lockup - CPU#3 stuck for 73s! [postgres:18723] > > Full dmesg output - http://pastebin.com/YdWSmNUp >

Re: [GENERAL] "soft lockup" in kernel

2013-07-05 Thread Dennis Jenkins
On Fri, Jul 5, 2013 at 8:58 AM, Stuart Ford wrote: > On Fri, Jul 5, 2013 at 7:00 AM, Dennis Jenkins wrpte > > No. iSCSI traffic between the VMWare hosts and the SAN uses completely > separate NICs and different switches to the "production" LAN. > I've had a look a

Re: [GENERAL] "soft lockup" in kernel

2013-07-15 Thread Dennis Jenkins
Stuart, I'm simply curious - did you resolve your issue? What NAS (vendor/model/config) are you using? On Fri, Jul 5, 2013 at 11:31 AM, Dennis Jenkins wrote: > > On Fri, Jul 5, 2013 at 8:58 AM, Stuart Ford wrote: > >> On Fri, Jul 5, 2013 at 7:00 AM, Dennis Jenkin

Re: [GENERAL] begin transaction locks out other connections

2008-04-11 Thread Dennis Brakhane
On Thu, Apr 10, 2008 at 4:40 PM, Pavan Deolasee <[EMAIL PROTECTED]> wrote: > On Thu, Apr 10, 2008 at 7:18 PM, Ivano Luberti <[EMAIL PROTECTED]> wrote: > > I think that's because Postgres does not have deferred constraint checks. I believe it does. See http://www.postgresql.org/docs/8.3/interactiv

[GENERAL] plpgsql functions and the planner

2008-04-26 Thread Matthew Dennis
Do SQL statements inside of plpgsql functions get planned upon every execution, only when the function is first executed/defined, or something else entirely? For example, suppose I have a table foo and a function bar. Function bar executes some SQL statements (select/insert/update) against table

Re: [GENERAL] Sorting nulls and empty strings together

2008-04-28 Thread Dennis Muhlestein
her ? Well, you could use a case statement to change empty strings to NULL in your select: select case when testcol='' then NULL else testcol end as testcol from test order by testcol; There may be a better way, like a rule or something, but this seemed like a quick easy thing t

Re: [GENERAL] Extracting data from deprecated MONEY fields

2008-06-07 Thread Dennis Bjorklund
Here is a cast function I wrote some years ago to convert a couple of money columns to numeric http://zigo.org/postgresql/#cast_money_to_numeric You already have a solution, but maybe it is of value to someone else. /Dennis Ken Winter skrev: Right you are, Tom! In case anyone else is

[GENERAL] functions, selects and the planner

2008-06-14 Thread Matthew Dennis
In PostgreSQL 8.3 lets say I have a table: create table t(c1 int, c2 int, ts0 timestamp with time zone, ts1 timestamp with time zone, data varchar); an index: create index t_c1_c2_ts0_idx on t using btree(c1, c2, ts0 desc); and a function: create function f(_ts timestamp(0) with time zone, _c1

[GENERAL] singletons per row in table AND locking response

2009-07-07 Thread Dennis Gearon
) ); CREATE UNIQUE INDEX IDX_One_Group_Row_Only ON singletons_for_last_grp_mbr_id_issued (group_id); ALTER TABLE singletons_for_last_grp_mbr_id_issued ADD CONSTRAINT group_singletons_for_last_grp_mbr_id_issued FOREIGN KEY (group_id) REFERENCES group (group_id) Dennis Gearon Signature Warning

Re: [GENERAL] singletons per row in table AND locking response

2009-07-07 Thread Dennis Gearon
I could have just as easily described it as a table of SERIALS, one per row, instead of per column. :0) Dennis Gearon Signature Warning EARTH has a Right To Life I agree with Bolivian President Evo Morales # The right to life: "The right for no ecosystem to be eliminat

[GENERAL] Date Time Arithmetic Speed

2009-07-11 Thread Dennis Gearon
sults. What are the tradeoffs in storage space, indexed query speed of the DATE and TIME formats, and speed of the math for the various for the combinations of DATE and TIME that would be possible to derive timestamps from? Dennis Gearon Signature Warning EARTH has a Right To Li

[GENERAL]

2009-07-11 Thread Dennis Gearon
Dennis Gearon Signature Warning EARTH has a Right To Life I agree with Bolivian President Evo Morales # The right to life: "The right for no ecosystem to be eliminated by the irresponsible acts of human beings." # The right of biosystems to regenerate

[GENERAL] indexes on float8 vs integer

2009-07-11 Thread Dennis Gearon
ogle mapes provides. I am expecting this table to be very huge. Hey, I want to be the next 'portal' :-) Dennis Gearon Signature Warning EARTH has a Right To Life I agree with Bolivian President Evo Morales # The right to life: "The right for no ecosyste

Re: [GENERAL] indexes on float8 vs integer

2009-07-12 Thread Dennis Gearon
store the first data. Dennis Gearon --- On Sun, 7/12/09, Brent Wood wrote: > From: Brent Wood > Subject: Re: [GENERAL] indexes on float8 vs integer > To: gear...@sbcglobal.net > Cc: pgsql-general@postgresql.org > Date: Sunday, July 12, 2009, 1:52 PM > Hi Dennis, > > Is t

Re: [GENERAL] indexes on float8 vs integer

2009-07-12 Thread Dennis Gearon
I wish that I didn't have to say this, but that is over my head at this point. I see this HUGE, steep mountain ahead of me and a little sign in front of it saying, "Learning Curve, start here." :-) Dennis Gearon Signature Warning EARTH has a Right To Lif

[GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
: (1) Post a good description. (2) Post a link to a good description. (3) Give input to me so that I can write a good tutorial to post on the postgres site? TIA, Dennis Gearon Signature Warning EARTH has a Right To Life I agree with Bolivian President E

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
I read it better, and it makes more sense now. But, I'd like it to show how to insert: 'strings' - which it does timestampz value -->using to_timestampz(...) integers::timestampz -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subsc

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
rom: Adrian Klaver > Subject: Re: [GENERAL] timestamp with time zone tutorial > To: "Dennis Gearon" > Cc: pgsql-general@postgresql.org > Date: Sunday, July 19, 2009, 5:15 PM > On Sunday 19 July 2009 4:56:09 pm > Dennis Gearon wrote: > > I read it better, and

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
raphical location of the SUBMITTER. > From: Adrian Klaver > Subject: Re: [GENERAL] timestamp with time zone tutorial Dennis Gearon wrote: > > None of the examples of converting a string > to_timestamp() show using a > > time zone input as an input.Does it allow full length

Re: [GENERAL] timestamp with time zone tutorial

2009-07-19 Thread Dennis Gearon
n't have that in the '/usr/share/zoneinfo/US' directory. My bad. I just have to read more on how to get it out relative to a different time zone than it went in. I'll find it. Dennis Gearon Signature Warning EARTH has a Right To Life I agree with Bolivi

[GENERAL] commercial adaptation of postgres

2009-07-20 Thread Dennis Gearon
ng like that on the commercial page of the posgres site. Does anyone know what it is out there in enterprise commercially modified postgres servers? (on 64 bit machines, preferably) Dennis Gearon Signature Warning EARTH has a Right To Life I agree with Bolivian President Evo

Re: [GENERAL] commercial adaptation of postgres

2009-07-21 Thread Dennis Gearon
Thanks Bricklen Dennis Gearon --- On Tue, 7/21/09, bricklen wrote: > From: bricklen > Subject: Re: [GENERAL] commercial adaptation of postgres > To: "Dennis Gearon" > Cc: pgsql-general@postgresql.org > Date: Tuesday, July 21, 2009, 7:33 AM > Greenplum uses a modi

[GENERAL] Content-Type in form variables

2009-07-25 Thread Dennis Gearon
"blob_value": NULL } -103832778631715 Content-Disposition: form-data; name="blob_value"; filename="previous.png" Content-Type: image/png ‰PNG  -----103832778631715 Dennis Gearon Signature Warning ---

Re: [GENERAL] Content-Type in form variables

2009-07-25 Thread Dennis Gearon
90726012447.gq5...@samason.me.uk> On Sat, Jul 25, 2009 at 11:12:15AM -0700, Dennis Gearon wrote: > If I receive a form via POST or PUT with with mulitple variables, > files, application/json, others, is there anywhere in the environment > to test he mime type of each variable

[GENERAL] tsearch2 on Synology

2009-07-31 Thread Dennis Janezic
linux distributions on the net, but I can't find a hint for Synology. Synology uses ipkg for installing software, but the automatic search does not find any relevant packages like contrib. Anyone an idea or even some experiances? Thanks for response, Dennis

[GENERAL] Use of Postgres in REST/JSON with BLOBS

2009-08-02 Thread Dennis Gearon
SILY 2 months worth of research and experiments in order to come to the solution that I am using. In order to share that with the Open Source world, I am posting my blog address to the related newsgroups that I'm on. http://php-rest-i18n.blogspot.com/ Comment, save yourself some research

[GENERAL] How do I use tsvector_update_trigger to index non-character columns?

2009-09-03 Thread dennis jenkins
Hello. I have several tables in a database that I want to use with "full text searching". Some of the fields in some of these tables are not character types, but for the purposes of searching, I'd like to include their "character representation" in the tsvector. Unfortunately, I cannot make t

Re: [GENERAL] hardware information

2009-09-15 Thread dennis jenkins
On Tue, Sep 15, 2009 at 3:03 PM, Scott Marlowe wrote: > On Tue, Sep 15, 2009 at 1:49 PM, John R Pierce wrote: >> std pik wrote: >>> >>> Hello all.. >>> I'm using PostgreSQL 8.3.. >>> How can I get information about the hardware utilization: >>>       - CPU usage. >>>       - Disk space. >>>      

[GENERAL] pgadmin3 hangs during dump

2009-10-16 Thread Dennis Gearon
cally empty. no other fancy stuff like functions/views/installed languages/blah,blah running on Ubuntu latptop I don't know if I have log files set up or where they'd be. Dennis Gearon Signature Warning EARTH has a Right To Life I agree with Bolivia

Re: [GENERAL] puzzling perl DBI vs psql problem

2014-03-13 Thread Dennis Jenkins
1) Run both "psql" and "perl" under "strace" and search the output for which sockets it connects to. eg, strace -o /tmp/psql.log psql -Upgsql -dmydatabase -c"select version();" 2) Add a query into your perl script to perform the following SQL and print the results: select current_database();

Re: [GENERAL] Extract (Recover) data from a cluster built on a different architecture (ARM).

2011-04-25 Thread dennis jenkins
On Sun, Apr 24, 2011 at 4:16 PM, Tom Lane wrote: > Phil Couling writes: > > I'm looking for a way to extract the data from a PostgreSQL 8.3.14 > > database (cluster) that was built using an an ARM/Linux server. The > > ... > > Are there any tools for recovering data from a database built with a

Re: [GENERAL] load sql from the file in postgresql

2011-04-29 Thread Dennis Grimm
Try using this, even on a windows system: \i /psql/loaddata.sql psql likes *nix path names From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sukuchha Shrestha Sent: Friday, April 29, 2011 5:40 AM To: pgsql-general@p

Re: [GENERAL] rationale behind quotes for camel case?

2011-06-28 Thread dennis jenkins
On Tue, Jun 28, 2011 at 8:43 AM, Merlin Moncure wrote: > > The rebuttal to the above points is that the problem with not quoting > is that your identifiers are folded to lower case on the server which > can make them difficult to read in psql, pgadmin, etc. when outputted. > This is true and I c

Re: [GENERAL] Detecting memory leaks with libpq?

2011-07-19 Thread dennis jenkins
On Tue, Jul 19, 2011 at 5:41 AM, Antonio Vieiro wrote: > Hi all, > > I'm building a small C application that uses libpq and I was wondering > if there's an easy way to detect memory leaks in my code. > > I think I'm calling PQclear and friends correctly, but I'd like to > double-check it. I was wo

[GENERAL] Solaris 10u9, PG 8.4.6, 'c' lang function, fails on 1 of 5 servers

2011-09-29 Thread dennis jenkins
Hello Postgresql Community Members, I am stumped trying to install a few 'c' language functions on a particular Solaris server (64-bit, amd cpu arch (not sparc)). I actually have 5 Postgresql servers, and the .so loads fine into 4 of them, but refuses to load into the 5th. I've quintuple che

Re: [GENERAL] Solaris 10u9, PG 8.4.6, 'c' lang function, fails on 1 of 5 servers

2011-10-07 Thread dennis jenkins
On Thu, Sep 29, 2011 at 12:08 PM, dennis jenkins < dennis.jenkins...@gmail.com> wrote: > > (root@failed: ) # psql -Upgsql -dmy_db -c"create or replace function > parse_micr(text) returns micr_struct > as '/db/pgsql_micr_parser_64.so', 'pgsql_micr_parser&#

[GENERAL] problem with recreating database with export

2012-09-26 Thread Dennis Gearon
ql -d database_name -f the_file.sql I get errors on \N and various other problems. I've tried dividing the file up into: table creation one 'copy' of a table at a time. One, a 35 mbyte seems to have errors on semi colons. Dennis Gearon Never, ever approach a computer saying or even t

Re: [GENERAL] problem with recreating database with export

2012-09-26 Thread Dennis Gearon
It turns out that I had made the export from psql, a text based export. So I read that it was actually needing to be imported using '\i filename_in_local_directory' Dennis Gearon Never, ever approach a computer saying or even thinking "I will just do this quickly."

  1   2   3   4   >