Re: [GENERAL] Approach to Data Summary and Analysis

2014-04-15 Thread Rob Sargent
On 04/15/2014 09:53 AM, Robert DiFalco wrote: Actually that was exactly the initial table design. There were more fields because for my use case there were a lot more states and certain states have additional data (for example when a call goes from answered to connected it also gets the user_id

Re: [GENERAL] any way for a transaction to "see" inserts done earlier in the transaction?

2014-04-16 Thread Rob Sargent
Not to say that perl and complex are redundant, but does the id go away after the NOT FOUND exception? On 04/16/2014 06:08 PM, Susan Cassidy wrote: The function does a select to see if the id number exists, and it fails. NOT FOUND causes a RAISE EXCEPTION. Susan On Wed, Apr 16, 2014 at 5:

Re: [GENERAL] Altering array(composite-types) without breaking code when inserting them and similar questions

2014-04-20 Thread Rob Sargent
Why do you think you need an array of theType v. a dependent table of theType. This tack is of course immune to to most future type changess. Sent from my iPhone > On Apr 20, 2014, at 11:57 AM, Dorian Hoxha wrote: > > Was just curious about the overhead. > > I know the columns, but i may nee

Re: [GENERAL] better performance on poorer machine?

2014-05-13 Thread Rob Sargent
On 05/13/2014 08:48 AM, Vegard Bønes wrote: Hi, I have a database on a test server with queries that perform terribly. Trying to fix this problem, I copied the database (using pg_dump) to my laptop, and reran tests there. The same queries perform perfectly on my laptop. I have tried to use th

Re: [GENERAL] Can a nested function determine it is being called within a trigger?

2011-04-15 Thread Rob Sargent
On 04/15/2011 05:36 PM, Tom Lane wrote: Basil Bourque writes: When a trigger calls a function, that function can determine if it is being called from within a trigger by testing for a value in the special variable "TG_OP". Uh, no, not really. TG_OP is a local variable in the trigger funct

Re: [GENERAL] converting databases form SQL_ASCII to UTF8

2011-04-22 Thread Rob Sargent
On 04/22/2011 09:16 AM, Geoffrey Myers wrote: Vick Khera wrote: On Fri, Apr 22, 2011 at 11:00 AM, Geoffrey Myers mailto:li...@serioustechnology.com>> wrote: Here's our problem. We planned on moving databases a few at a time. Problem is, there is a process that pushes data from one database to

Re: [GENERAL] Feature Request, aggregate functions distinct on

2011-04-26 Thread Rob Sargent
On 04/26/2011 04:33 PM, Tom Lane wrote: luda posch writes: I am not an expert on the official sql spec, but I think it would be useful if distinct on() could be used within an aggregate when supplied with another column name. For example: select sum(distinct on(id) order_price) from order

Re: [GENERAL] explain analyze buffer

2011-04-27 Thread Rob Sargent
On 04/27/2011 12:45 PM, SUBHAM ROY wrote: I am using postgres 8.4.8. |EXPLAIN (ANALYZE,BUFFERS)| is not working. So is there any patch available for it? If so, kindly specify from where to get it and how to install it. -- Thank You, Subham Roy, CSE IIT Bombay. Have you tried just plain exp

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-04-28 Thread Rob Sargent
On 04/28/2011 11:44 AM, Andy Colson wrote: On 4/28/2011 12:29 PM, Jim Irrer wrote: A colleague of mine insists that using surrogate keys is the common practice by an overwhelming margin in relational databases and that they are used in 99 percent of large installations. I agree that many situa

Re: [GENERAL] histogram

2011-04-30 Thread Rob Sargent
re: 1 and 2. They're horrible (imho) reference to the attributes of the returned tuple. Or at best an exposure of the implementation. :) Order by "2" if you want the most frequent (highest counts) of your distances at the bottom of the output (or ordery by 2 desc) if you want them at the top o

Re: [GENERAL] histogram

2011-04-30 Thread Rob Sargent
David Johnston wrote: Given that you are actively implementing the code that uses the 1 and 2 I don't see how it is that egregious. When generating calculated fields it is cleaner than the alternative: Select trunc(distance * 10.)/10., count(*) From doc_ads Group by (trunc(distance * 10.)) Or

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Rob Sargent
Jeff Davis wrote: On Mon, 2011-05-02 at 11:10 -0400, Greg Smith wrote: The position Merlin has advocated here, that there should always be a natural key available if you know the data well enough, may be true. But few people are good enough designers to be sure they've made the decision cor

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Rob Sargent
John R Pierce wrote: otoh, there's plenty of places where natural keys are optimal. my company makes widgets, and we make damn sure our serial #s and part numbers are unique, and we use them as PK's for the various tables. further, the PN has a N digit prefix which is unique to a part fam

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-02 Thread Rob Sargent
Craig Ringer wrote: On 03/05/11 11:07, Greg Smith wrote: That doesn't mean you can't use them as a sort of foreign key indexing the data; it just means you can't make them the sole unique identifier for a particular entity, where that entity is a person, company, or part. Classic ca

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-03 Thread Rob Sargent
On 05/03/2011 12:51 PM, Jeff Davis wrote: On Mon, 2011-05-02 at 20:06 -0600, Rob Sargent wrote: Jeff Davis wrote: In particular, I think you are falsely assuming that a natural key must be generated from an outside source (or some source outside of your control), and is therefore not

Re: [GENERAL] pervasiveness of surrogate (also called synthetic) keys

2011-05-03 Thread Rob Sargent
On 05/03/2011 03:08 PM, Jeff Davis wrote: On Tue, 2011-05-03 at 13:35 -0600, Rob Sargent wrote: Sorry, but I'm confused, but that's common. Isn't a "natural key" to be compose solely from the attributes of the entity? As in a subset of the columns of the table i

Re: [GENERAL] Role for CSV import

2011-05-15 Thread Rob Sargent
Tarlika Elisabeth Schmitz wrote: I have a database that will be populated solely by CSV import. There are several CSV file formats, all denormalized. I have created interim tables which match the CSV file formats. An insert trigger distributes the data to their appropriate destination tables.

Re: [GENERAL] Consistency of distributed transactions

2011-05-31 Thread Rob Sargent
Craig Ringer wrote: On 1/06/2011 4:52 AM, Pete Chown wrote: Is there a solution to this, or is the point that I'm simply asking too much? Perhaps the Java EE container is not promising consistency in the sense I'm talking about. Distributed transactions will give you atomicity if done right

Re: [GENERAL] Pl/pgsql function

2011-06-04 Thread Rob Sargent
Nick Raj wrote: I am implementing some pl/pgsql functions. Is there any way to change the input for example- I got some value by $1. I want to modify this value (means split that value), Can we do this and how? Second thing, Suppose i defined a function test as select test('geom',the_geom,

Re: [GENERAL] Can't drop temp table in subfunction during cursor loop (being used by active queries)

2011-06-12 Thread Rob Sargent
jonathansfl wrote: Using PG 8.4.2 with Ubuntu 10.04.2 LTS. Inside a cursor of FUNCTION-A, I call another function (FUNCTION-B). Function-B has a "Drop ,Table" command followed by a CREATE TEMPORARY TABLE command. The cursor loops but when it runs out, it breaks, giving error: "Cannot DROP T

[GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-21 Thread Rob Sargent
Seems to me a lot of the needed standard libraries are in '/lib64' and the linker isn't looking for them there? So far I've hit libreadline and libz. Do I just keep making the sim-links into /usr/lib64? postgres 9.0.3 on 11.2 worked like a champ. Unforturnately I've upgraded my os, thought I wo

Re: [GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-21 Thread Rob Sargent
On 06/21/2011 06:49 PM, Tom Lane wrote: > Rob Sargent writes: >> Seems to me a lot of the needed standard libraries are in '/lib64' and >> the linker isn't looking for them there? So far I've hit libreadline >> and libz. Do I just keep making the si

Re: [GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-21 Thread Rob Sargent
Tom Lane wrote: Rob Sargent writes: The tail of config.log follows. As I confessed, libreadline had to be simlinked into /usr/lib64, then I hit libz (as this log shows) and started to doubt myself (even more). configure:8316: checking for library containing readline configure

Re: [GENERAL] CRUD plpgsql generator

2011-06-22 Thread Rob Sargent
On 06/22/2011 08:02 AM, Merlin Moncure wrote: > On Wed, Jun 22, 2011 at 5:40 AM, Wim Bertels wrote: >> Hallo, >> >> does anyone have know of a free CRUD generator >> for generating plpgsql functions for doing CRUD operations on all the >> tables of a database or schema or just one table or.. >>

Re: [GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-22 Thread Rob Sargent
On 06/21/2011 06:58 PM, Rob Sargent wrote: > > > On 06/21/2011 06:49 PM, Tom Lane wrote: >> Rob Sargent writes: >>> Seems to me a lot of the needed standard libraries are in '/lib64' and >>> the linker isn't looking for them there? So far I&

Re: [GENERAL] CRUD plpgsql generator

2011-06-22 Thread Rob Sargent
On 06/22/2011 09:10 AM, Merlin Moncure wrote: > On Wed, Jun 22, 2011 at 9:59 AM, Rob Sargent wrote: >> On 06/22/2011 08:02 AM, Merlin Moncure wrote: >>> On Wed, Jun 22, 2011 at 5:40 AM, Wim Bertels >>> wrote: >>>> Hallo, >>>> >>&

Re: [GENERAL] building 9.1 on suse-11.4 (64bit) - EOF

2011-06-22 Thread Rob Sargent
On 06/22/2011 10:27 AM, Rob Sargent wrote: > > > On 06/21/2011 06:58 PM, Rob Sargent wrote: >> >> >> On 06/21/2011 06:49 PM, Tom Lane wrote: >>> Rob Sargent writes: >>>> Seems to me a lot of the needed standard libraries are in '/lib64&#

Re: [GENERAL] building 9.1 on suse-11.4 (64bit)

2011-06-22 Thread Rob Sargent
On 06/22/2011 10:27 AM, Rob Sargent wrote: > > > On 06/21/2011 06:58 PM, Rob Sargent wrote: >> >> >> On 06/21/2011 06:49 PM, Tom Lane wrote: >>> Rob Sargent writes: >>>> Seems to me a lot of the needed standard libraries are in '/lib64&#

Re: [GENERAL] Relative path specified for data_directory is not working as expected

2011-06-23 Thread Rob Sargent
Eduard-Cristian Stefan wrote: I have PostgreSQL 9.0.4-1 running as a service on Windows XP Home Edition, with the command line of the service being: D:\me\usr\PostgreSQL\bin/pg_ctl.exe runservice -N "pgsql" -D "d:/me/etc/PostgreSQL" In the postgresql.conf file I have the following sett

[GENERAL] glitch installing xml support in 9.1.beta2

2011-06-24 Thread Rob Sargent
OpenSuse 11.4 x86-64 gmake install builds and places the requisite pieces as expected. Running psql --username postgres -d postgres -f xml2--1.0,sql results in psql:xml2--1.0.sql:8: ERROR: function "xml_valid" already exists with same argument types psql:xml2--1.0.sql:12: ERROR

Re: [GENERAL] glitch installing xml support in 9.1.beta2

2011-06-25 Thread Rob Sargent
Guillaume Lelarge wrote: On Fri, 2011-06-24 at 11:22 -0600, Rob Sargent wrote: OpenSuse 11.4 x86-64 gmake install builds and places the requisite pieces as expected. Running psql --username postgres -d postgres -f xml2--1.0,sql results in psql:xml2--1.0.sql:8: ERROR

Re: [GENERAL] glitch installing xml support in 9.1.beta2

2011-06-27 Thread Rob Sargent
On 06/25/2011 01:10 AM, Guillaume Lelarge wrote: > On Fri, 2011-06-24 at 11:22 -0600, Rob Sargent wrote: >> OpenSuse 11.4 x86-64 >> >> gmake install builds and places the requisite pieces as expected. >> >> Running >> psql --username postgres -d

Re: [GENERAL] Multi-tenancy in Postgres

2011-06-28 Thread Rob Sargent
I think Greg might be forgetting that some of us don't always get to choose what we work on. I was in a shop that decided to go with multi-tenancy for reason both technical and um, er envious. One schema to update versus n, for an example of the former. Amazon does it, for the other example. But

Re: [GENERAL] Multi-tenancy in Postgres

2011-06-28 Thread Rob Sargent
On 06/28/2011 04:52 PM, Greg Smith wrote: > On 06/28/2011 05:45 PM, Rob Sargent wrote: >> I think Greg might be forgetting that some of us don't always get to >> choose what we work on. I was in a shop that decided to go with >> multi-tenancy for reason both te

Re: [GENERAL] Windows x64 : How do I get OSSP-UUID.sql contrib for postgresql x64

2011-06-28 Thread Rob Sargent
On 06/28/2011 04:13 PM, Grace Batumbya wrote: > The installer for windows for 64bit versions of postgresql doesn't > include ossp-uuid.sql. > Does anyone know where or how to get this? > > Thanks > -- > *Grace Batumbya* > Research Assistant | Seneca CDOT > Phone: 416-491-5050 x3548 > cdot.seneca

Re: [GENERAL] PL/PGSQL - dynamic variable names

2011-06-28 Thread Rob Sargent
On 06/28/2011 06:29 PM, Ben Carbery wrote: > Hi, > > I am trying to EXECUTE .. INTO a variable that I want to be > dynamically named. > > stuff := '{a,b,c,d}'; > > FOR i IN 1..4 LOOP > thing := stuff[i]; > > -- stuff_a, stuff_b etc are functions - substitution works here >

Re: [GENERAL] PL/PGSQL - dynamic variable names

2011-06-28 Thread Rob Sargent
Ben Carbery wrote: Hm, "a" isn't a variable,it's the value of stuff[1]. It's both.. DECLARE a integer; b integer; The point is I want a dynamically named variable. Here I've named them the same as stuff[i] but they can be anything provided it is a different variable name on

Re: [GENERAL] Table dublicates values

2011-07-16 Thread Rob Sargent
Deniz Atak wrote: Hi all, I am using postgresql on Glassfish server. When I restart the server for some reason, one of my databases' tables duplicates the values. For example aTable is from aDatabase: select * from aTable col1 | col2 ---+- text/html

Re: [GENERAL] error when compiling a c function

2011-07-27 Thread Rob Sargent
On 07/27/2011 12:38 PM, Ioana Danes wrote: > Thanks a lot Sebastian > > --- On Wed, 7/27/11, Sebastian Jaenicke > wrote: > >> From: Sebastian Jaenicke >> Subject: Re: [GENERAL] error when compiling a c function >> To: "Ioana Danes" >> Cc: "PostgreSQL General" >> Received: Wednesday, July 27,

[GENERAL] post installation addition of uuid extension

2011-08-05 Thread Rob Sargent
I've inherited some version 9.0 databases which make use of the uuid data type but which do not have the uuid-generate-vx() functions. These installations are running on openSUSE 11.3 (x86_64) and were installed (probably) from yast. I've loaded the requisite share-libs (also via yast) (/usr/lib64

[GENERAL] post installation addition of uuid extension

2011-08-05 Thread Rob Sargent
I've inherited some version 9.0 databases which make use of the uuid data type but which do not have the uuid-generate-vx() functions. These installations are running on openSUSE 11.3 (x86_64) and were installed (probably) from yast. I've loaded the requisite share-libs (also via yast) (/usr/lib64

Re: [GENERAL] post installation addition of uuid extension

2011-08-05 Thread Rob Sargent
On 08/05/2011 05:26 PM, Tom Lane wrote: > Rob Sargent writes: >> I've inherited some version 9.0 databases which make use of the uuid >> data type but which do not have the uuid-generate-vx() functions. >> These installations are running on openSUSE 11.3 (x86_64) and w

Re: [GENERAL] post installation addition of uuid extension

2011-08-05 Thread Rob Sargent
On 08/05/2011 05:26 PM, Tom Lane wrote: > Rob Sargent writes: >> I've inherited some version 9.0 databases which make use of the uuid >> data type but which do not have the uuid-generate-vx() functions. >> These installations are running on openSUSE 11.3 (x86_64) and w

Re: [GENERAL] setting display format of booleans in psql

2011-08-06 Thread Rob Sargent
Pavel Stehule wrote: Hello there is not any possibility to change boolean output format. Regards Pavel Stehule 2011/8/6 Henry House : Is there a way to set the display format of boolean values in psql just as one can set the display of nulls using \pset null ? I find presentation of tru

Re: [GENERAL] Functions returning setof record -- can I use a table type as my return type hint?

2011-08-12 Thread Rob Sargent
On 08/12/2011 10:04 AM, George MacKerron wrote: > Hi all. > > I have a function returning setof record. The name of a table it acts on is > one of its input variables, and its output is a set of rows from that table. > E.g. for simplicity, imagine it's this pointless function: > > create or repla

Re: [GENERAL] How to tame a gigantic (100+ lines) query in a web app?

2011-08-14 Thread Rob Sargent
W. Matthew Wilson wrote: I'm sure I'm not the first person to end up with a gigantic query that does lots of left joins and subselects. It seems to work, but I would love to break it up into smaller chunks. I'm thinking about rewriting the query to make several temporary tables that are dropp

[GENERAL] documentation suggestion

2011-08-23 Thread Rob Sargent
Apologies if this is the wrong forum. If there has been a suggestion to get the "Up" hyperlink placed also at/near the top of the page, please add my vote. Else could this be considered as a feature request? rjs -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chan

Re: [GENERAL] documentation suggestion

2011-08-23 Thread Rob Sargent
Bruce Momjian wrote: Rob Sargent wrote: Apologies if this is the wrong forum. If there has been a suggestion to get the "Up" hyperlink placed also at/near the top of the page, please add my vote. Else could this be considered as a feature request? I have talked to Peter

Re: [GENERAL] Setting a psql variable from SQL output

2011-08-26 Thread Rob Sargent
On 08/26/2011 02:16 PM, Merlin Moncure wrote: > On Fri, Aug 26, 2011 at 3:01 PM, Bobby Dewitt wrote: >> Is there a way to get output from a SQL command or function and have it be >> set to a variable value in psql? My main goal is to execute a certain >> script depending on the version of the d

Re: [GENERAL] Materialized views in Oracle

2011-09-22 Thread Rob Sargent
On 09/21/2011 11:34 PM, Mike Christensen wrote: [ much omitted ] > One of the major components I'm working on is this reporting engine > that runs these major huge expensive queries (seriously, some of them > take 2-3 minutes to run) to generate data that gets dumped to an Excel > file for VPs t

Re: [GENERAL] Rules going away

2011-09-28 Thread Rob Sargent
On 09/28/2011 08:34 AM, Tom Lane wrote: > Andrew Sullivan writes: >> On Wed, Sep 28, 2011 at 06:20:04AM -0700, David Fetter wrote: >>> There's an even better reason not to use rules: they're going away in >>> a not too distant version of PostgreSQL. >> Really? How? I thought views were done us

Re: [GENERAL] Why PGSQL has no developments in the .NET area?

2011-10-01 Thread Rob Sargent
Rohit Coder wrote: PgSQL has just one old NPGSQL driver for .NET, which is itself sluggish. The ODBC driver works better as compared to NPGSQL, but I suspect the ODBC driver is not the right choice for ORM framework of .NET. I want to know whether there is any efficient .NET provider and is P

Re: [GENERAL] SELECT statement not working as intended

2011-10-10 Thread Rob Sargent
On 10/10/2011 05:52 PM, Rich Shepard wrote: > On Mon, 10 Oct 2011, John R Pierce wrote: > >> the complication is, there can be more than one date with the same >> maximum >> value, so such a query would be ambiguous, or it would return multiple >> rows. > > John, > > The likelihood of that is d

Re: [GENERAL] index bloat question

2011-10-16 Thread Rob Sargent
Scott Marlowe wrote: On Sun, Oct 16, 2011 at 2:41 PM, Szymon Guz wrote: Hi, just a couple of questions: will there be an index bloat if I have: - a serial column and only add rows to the table? - a text column and I only add rows to the table? For the serial column the numbers are only inc

Re: [GENERAL] Help with sql

2012-07-06 Thread Rob Sargent
On 07/06/2012 03:34 PM, Perry Smith wrote: Hi Guys, This isn't a PostgreSQL specific question but just a SQL question. If this is not an appropriate question for this list, please let me know. It is also, perhaps, a really silly question. This query (without the 'explain' keyword) , when exe

Re: [GENERAL] Finding Duplicate Rows during INSERTs

2012-07-09 Thread Rob Sargent
On 07/09/2012 04:48 PM, Rich Shepard wrote: Source data has duplicates. I have a file that creates the table then INSERTS INTO the table all the rows. When I see errors flash by during the 'psql -d -f ' I try to scroll back in the terminal to see where the duplicate rows are located. Too ofte

Re: [GENERAL] Trouble with NEW

2012-07-18 Thread Rob Sargent
On 07/18/2012 12:07 PM, Bob Pawley wrote: Hi I would appreciate some fresh eyes on this expression - update p_id.fluids set fluid_short = (select shape.text from shape, num_search where (select st_within(shape.wkb_geometry, st_geometryn(num_search.the_geom4, 1)) = 'true')

Re: [GENERAL] change column data type of a big table

2012-08-10 Thread Rob Sargent
On 08/10/2012 12:05 AM, John R Pierce wrote: On 08/09/12 10:31 PM, Anibal David Acosta wrote: I have a very big table, in fact only this table uses approx. 60% space of disk. The table is an standalone table (no one inherit from this and this is not inherit from another). I need to change a i

Re: [GENERAL] Can column name aliases be supported?

2012-08-22 Thread Rob Sargent
On 08/22/2012 04:19 PM, Gauthier, Dave wrote: Here's the problem I have a table with a column called "last_name". I have one customer who likes to articulate queries and updates for this using column name "last_name" (no problem there) but another who likes to call it "lname" and yet anothe

Re: [GENERAL] What text format is this and can I import it into Postgres?

2012-08-22 Thread Rob Sargent
On 08/22/2012 06:23 PM, Mike Christensen wrote: I'd like to import this data into a Postgres database: http://www.ars.usda.gov/SP2UserFiles/Place/12354500/Data/SR24/dnload/sr24.zip However, I'm not quite sure what format this is. It's definitely not CSV. Here's an example of a few rows: ~010

Re: [GENERAL] What text format is this and can I import it into Postgres?

2012-08-22 Thread Rob Sargent
On 08/22/2012 06:23 PM, Mike Christensen wrote: I'd like to import this data into a Postgres database: http://www.ars.usda.gov/SP2UserFiles/Place/12354500/Data/SR24/dnload/sr24.zip However, I'm not quite sure what format this is. It's definitely not CSV. Here's an example of a few rows: ~010

Re: [GENERAL] run function on server restart

2012-08-24 Thread Rob Sargent
On 08/24/2012 03:46 PM, John D. West wrote: I have various background processes outside of postgres that need to be killed and restarted after the server reboots. -- John On Fri, Aug 24, 2012 at 2:29 PM, Kevin Grittner mailto:kevin.gritt...@wicourts.gov>> wrote: "John D. West" mailt

Re: [GENERAL] Time-based trigger

2012-09-18 Thread Rob Sargent
On 09/18/2012 10:03 AM, Szymon Guz wrote: On 18 September 2012 17:59, Robert Sosinski mailto:rsosin...@ticketevolution.com>> wrote: We have a table, which has items that can be put on hold of 5 minutes (this is for an online store) once they are placed into a cart. What we need is f

Re: [GENERAL] PostgreSQL, OLAP, and Large Clusters

2012-09-27 Thread Rob Sargent
On 09/27/2012 12:50 PM, Ryan Kelly wrote: What do you mean by "fewer faster cores"? Wouldn't "more faster cores" be better? I believe his point is core does not equal cpu. Too often I've watched cpu performance meters with one core pegged and the other(s) idle, since really it's one cpu. I s

Re: [GENERAL] COPY FROM in psql

2012-11-20 Thread Rob Sargent
On 11/20/2012 11:47 AM, Matthew Vernon wrote: Matthew Vernon writes: naiively, you might try: \set pwd '\'' `pwd` '\'' COPY table FROM :pwd || '/relative/path/to/data' ; I should also note that I want to run a series of these commands, hence setting pwd once and then wanting to use it multip

Re: [GENERAL] get column name passed to a function

2012-11-20 Thread Rob Sargent
On 11/20/2012 01:35 PM, Adrian Klaver wrote: On 11/20/2012 11:36 AM, Rhys A.D. Stewart wrote: Greetings, I'm looking to obtain the name of a column that is passed to a function, similar to xmlforest. Suggestions? This is going to require some more information. 1) What language is the functio

Re: [GENERAL] get column name passed to a function

2012-11-20 Thread Rob Sargent
On 11/20/2012 02:03 PM, Adrian Klaver wrote: On 11/20/2012 12:51 PM, Rob Sargent wrote: On 11/20/2012 01:35 PM, Adrian Klaver wrote: On 11/20/2012 11:36 AM, Rhys A.D. Stewart wrote: Greetings, I'm looking to obtain the name of a column that is passed to a function, similar to xmlf

Re: [GENERAL] Implicit transaction not rolling back after error

2012-12-20 Thread Rob Sargent
On 12/20/2012 04:33 PM, Stephen Touset wrote: On Dec 20, 2012, at 3:27 PM, Adrian Klaver wrote: When on (the default), each SQL command is automatically committed upon successful completion. To postpone commit in this mode, you must enter a BEGIN or START TRANSACTION SQL command. When off o

[GENERAL] build of 9.0 did not make an "etc" directory

2010-09-29 Thread Rob Sargent
The log from make shows echo "#define PGBINDIR \"/opt/PostgreSQL/9.0/bin\"" >pg_config_paths.h echo "#define PGSHAREDIR \"/opt/PostgreSQL/9.0/share/postgresql\"" >>pg_config_paths.h echo "#define SYSCONFDIR \"/opt/PostgreSQL/9.0/etc/postgresql\"" >>pg_config_paths.h echo "#

Re: [GENERAL] Analyze tool?

2010-10-01 Thread Rob Sargent
Then to get all statements would one simply set log_min_duration to some arbitrarily small value? On 10/01/2010 04:30 AM, Thom Brown wrote: > 2010/10/1 Bjørn T Johansen : >> We are using both DB2 and PostgreSQL at work and DB2 has a nice tool, i5 >> Navigator, where one can enable logging of SQL

Re: [GENERAL] psql is too slow to connect

2011-11-04 Thread Rob Sargent
On 11/04/2011 12:08 PM, Tom Lane wrote: > "Ing.Edmundo.Robles.Lopez" writes: >> Hi, I have a problem with psql, is very slow to connect. I Checked the >> status of my network and the server and the client respond ok. > > First thing that comes to mind is DNS lookup problems. It's hard to > spe

Re: [GENERAL] 9.1.1 build failure : postgres link fails

2011-11-20 Thread Rob Sargent
On 11/20/2011 09:24 AM, Tom Lane wrote: > Rob Sargentg writes: >> I just got round to updating my laptop to ubuntu-10.4 (32bit), in part >> because I kept hitting snags while trying to configure postgres 9.1.1. >> ubuntu-10.4 is not the latest of course and comes with gnu make 3.8.1, >> but it

Re: [GENERAL] 9.1.1 build failure : postgres link fails

2011-11-21 Thread Rob Sargent
This may be a duplicate response. On 11/20/2011 11:05 AM, Tom Lane wrote: > Rob Sargent writes: >> On 11/20/2011 09:24 AM, Tom Lane wrote: >>> It appears that on Ubuntu, libbsd defines those symbols, which confuses >>> configure into supposing that they're provide

Re: [GENERAL] PostgreSQL DBA in SPAAAAAAAACE

2011-12-06 Thread Rob Sargent
On 12/06/2011 01:56 PM, Glyn Astill wrote: > __ > >> From: Merlin Moncure >> To: Joe Miller >> Cc: pgsql-general@postgresql.org >> Sent: Tuesday, 6 December 2011, 17:30 >> Subject: Re: [GENERAL] PostgreSQL DBA in SPCE >> >> On Tue, Dec 6, 2011 at 10:56 AM,

Re: [GENERAL] PostgreSQL DBA in SPAAAAAAAACE

2011-12-06 Thread Rob Sargent
e: >> On Tue, Dec 6, 2011 at 2:20 PM, Rob Sargent wrote: >>> >>> >>> On 12/06/2011 01:56 PM, Glyn Astill wrote: >>>> __ >>>> >>>>> From: Merlin Moncure >>>>> To: Joe Miller >&g

[GENERAL] Is the a "magic number" for WAL files

2011-12-09 Thread Rob Sargent
I would like the "file" command to tell me something other than "data", yes even though I can tell by the name (and the directory of course). Hoping someone has something I can slip into /usr/share/misc/magic.mgc or that directory. Along the same lines, what info is embedded in the file name? I se

Re: [GENERAL] Best way to create unique primary keys across schemas?

2012-01-24 Thread Rob Sargent
On 01/24/2012 04:23 PM, Merlin Moncure wrote: > On Tue, Jan 24, 2012 at 5:23 AM, panam wrote: >> Wow, this is pretty useful. Just to fit it more to my original use case, I >> used this: >> >> CREATE schema schema1; >> CREATE schema schema2; >> CREATE TABLE tbl (ID serial primary key,foo varchar,

Re: [GENERAL] Upgrade to 9.1 causing function problem

2012-02-23 Thread Rob Sargent
On 02/23/2012 12:49 PM, Willem Buitendyk wrote: Here are the log returns: 2012-02-23 11:31:44 PST WARNING invalid value for parameter "search_path": "crabdata" 2012-02-23 11:31:44 PST DETAIL schema "crabdata" does not exist Bizarre because I did set my search path to the schema c

Re: [GENERAL] Calculated update

2012-03-12 Thread Rob Sargent
On 03/12/2012 06:28 PM, Bret Stern wrote: trying to update a varchar numeric string column by converting it to int, adding a numeric value and insert it back as a varchar Having trouble with cast Possibly having trouble with two casts: one from string to int, one from int to string? You sql

[GENERAL] Did xpath_table get dropped.

2012-03-14 Thread Rob Sargent
I don't see anything to that effect in the release notes I've looked at. I built 9.1.2 from source with these options. CONFIGURE = '--with-libraries=/lib:/lib64:/lib/x86_64-linux-gnu' '--with-python' '--with-openssl' '--with-ossp-uuid' '--with-libxml' '--with-libxslt' \df xpath*

Re: [GENERAL] Did xpath_table get dropped.

2012-03-15 Thread Rob Sargent
On 03/14/2012 09:49 PM, Rob Sargent wrote: On 03/14/2012 08:57 PM, Tom Lane wrote: Rob Sargent writes: I don't see anything to that effect in the release notes I've looked at. That's cause it's still there. Did you remember to build/install contrib/xml2? The xpath func

<    1   2   3   4