Re: [GENERAL] Distributing PostGres database to various customers

2007-06-11 Thread Sean Davis
Mike Gould wrote: > All, > > I am new to PostGres 8 (using 8.2.4 windows version). We have for > several years been using iAnywhere's SQL Anywhere product with our > commercial transportation software. With ASA there are 2 files that > must be distributed for the database, a filename.db and a fi

Re: [GENERAL] [NOVICE] Recursive relationship - preventing cross-index entries.

2007-06-20 Thread Sean Davis
Andrew Maclean wrote: > I got no answer so I am trying again. > > In a nutshell, if I have a recrusive relationship as outlined below, how > do I implement a rule for the adjustments table that prevents the entry > of an Id into the Ref column if the id exists in the Id column and vice > versa? >

[GENERAL] pam authentication

2007-09-11 Thread Sean Davis
I am making a first attempt at getting pam authentication working with a postgres 8.2.4 installation on suse 10.2. I have created the file: /etc/pam.d/postgresql: authrequired/lib64/security/pam_ldap.so account required/lib64/security/pam_ldap.so and in my pg_hba.conf, I have

Re: [GENERAL] use COPY TO on normalized database

2007-09-15 Thread Sean Davis
Acm wrote: I am working with PostgreSQL 8.2.4. I need to use the SQL COPY (COPY table FROM file) statement to populate my database. I have created a normalized data model (up to 3NF). Is it possible to use COPY TO on a particular table (that is linked to other tables using foreign keys) whilst

Re: [GENERAL] GRANT on group does not give access to group members

2007-09-15 Thread Sean Davis
wild_oscar wrote: Well, after further searching and reviewing the code I believe the problem was the NOINHERIT in the login role creation. So the remaining question is: On another question, if I want to grant privileges to all tables I have to do them ONE BY ONE. Granting the privileges on the

Re: [GENERAL] more problems with count(*) on large table

2007-09-28 Thread Sean Davis
Mike Charnoky wrote: > Hi, > > I am still having problems performing a count(*) on a large table. This > is a followup from a recent thread: > > http://archives.postgresql.org/pgsql-general/2007-09/msg00561.php > > Since the last time these problems happened, we have tweaked some > postgresql c

[GENERAL] XML database

2007-11-01 Thread Sean Davis
I have a large set of XML files (representing about 18M records) that I would like to load into postgres. I have been loading the records into relational tables. Is this the best way to go? I am particularly interested in full-text searches of a subset of the elements. I am on 8.3Beta. Th

[GENERAL] XML schema

2007-11-15 Thread Sean Davis
Sorry for the cross-post, but I wasn't sure where this should go. I have a large XML file (about 7.5Gb) that is composed of about 17 million individual records. I have successfully loaded these records as individual XML records into a table with 17M rows. However, I looked around a bit and notic

Re: [GENERAL] XML schema

2007-11-16 Thread Sean Davis
On Nov 15, 2007 6:20 PM, Peter Eisentraut <[EMAIL PROTECTED]> wrote: > Sean Davis wrote: > > Is the current XML datatype (in 8.3) the direction of the > > future, or is something more akin to a dedicated XML schema (I think > > this is the route that Oracle has gone) go

Re: [GENERAL] XML schema

2007-11-16 Thread Sean Davis
On Nov 16, 2007 2:14 PM, Peter Eisentraut <[EMAIL PROTECTED]> wrote: > Sean Davis wrote: > > I meant a schema that > > represents a general mapping between XML and a relational schema. In > > other words, I am looking for tools that use postgresql as the storage

[GENERAL] plpython and error catching

2007-11-19 Thread Sean Davis
What is the expected behavior of a construct like this: def insert_xml(elem): id=int(elem.findtext('PMID')) try: plpy.execute(plan,[unicode(ET.tostring(elem)),id]) except: plpy.execute(plan2,[unicode(ET.tostring(elem)),id]) id is a primary key on the table into which I

[GENERAL] plpython array support

2007-11-19 Thread Sean Davis
Just a simple question--does plpythonu (8.3beta) have support for arrays? I don't see a specific mention of it in the docs, so I suppose not. Thanks, Sean ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://ww

Re: [GENERAL] plpython array support

2007-11-19 Thread Sean Davis
On Nov 19, 2007 9:08 PM, Jorge Godoy <[EMAIL PROTECTED]> wrote: > Em Monday 19 November 2007 19:29:51 Sean Davis escreveu: > > Just a simple question--does plpythonu (8.3beta) have support for > > arrays? I don't see a specific mention of it in the docs, so I > >

[GENERAL] [OT] RAID controllers blocking one another?

2008-01-17 Thread Sean Davis
We have a machine that serves as a fileserver and a database server. Our server hosts a raid array of 40 disk drives, attached to two3-ware cards, one 9640SE-24 and one 9640SE-16. We have noticed that activity on one controller blocks access on the second controller, not only for disk-IO but also

[GENERAL] MySQL to Postgresql schema conversion

2008-09-30 Thread Sean Davis
There are a number of mysql to postgresql converters available, but many of them have significant shortcomings. Has anyone found a tool that works well? I am trying to convert a couple of relatively large, public schema to postgresql. Thanks, Sean -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] MySQL to Postgresql schema conversion

2008-09-30 Thread Sean Davis
On Tue, Sep 30, 2008 at 10:08 AM, Sean Davis <[EMAIL PROTECTED]> wrote: > There are a number of mysql to postgresql converters available, but > many of them have significant shortcomings. Has anyone found a tool > that works well? I am trying to convert a couple of relatively

Re: [GENERAL] MySQL to Postgresql schema conversion

2008-09-30 Thread Sean Davis
On Tue, Sep 30, 2008 at 1:18 PM, Merlin Moncure <[EMAIL PROTECTED]> wrote: > On Tue, Sep 30, 2008 at 12:48 PM, Sean Davis <[EMAIL PROTECTED]> wrote: >> On Tue, Sep 30, 2008 at 10:08 AM, Sean Davis <[EMAIL PROTECTED]> wrote: >>> There are a number of mysql to

[GENERAL] General data warehousing questions

2008-10-05 Thread Sean Davis
I am looking at the prospect of building a data warehouse of genomic sequence data. The machine that produces the data adds about 300million rows per month in a central fact table and we will generally want the data to be "online". We don't need instantaneous queries, but we would be using the da

Re: [NOVICE] [GENERAL] Connect to postgresql database using Perl

2010-03-31 Thread Sean Davis
On Wed, Mar 31, 2010 at 3:25 AM, dipti shah wrote: > Thanks Guys. DBI works fine. I have written below code but it executes only > on the server where I installed postgresql. Is there any way to run this > code from remote host. I get an error when trying to run it from remote > host. I think it i

Re: [GENERAL] [INTERFACES] PGSQL and Javascript

2009-01-30 Thread Sean Davis
No. I'm not sure how that could be done given the security concerns. Sean On Fri, Jan 30, 2009 at 6:40 AM, Reg Me Please wrote: > Hello all. > > Is there a way to directly access PGSQL from a Javascript application? > With no application server intervention, I mean. > Just like libq allows acces

Re: [INTERFACES] [GENERAL] PGSQL and Javascript

2009-01-30 Thread Sean Davis
On Fri, Jan 30, 2009 at 7:09 AM, Reg Me Please wrote: > I'd like to write part of the application in Javascript, server side, not > in > the web page. > I missed your point. Do a google search for javascript interpreters in the language of your choice. For example, there is Rhino for java. Sea

Re: [INTERFACES] [GENERAL] PGSQL and Javascript

2009-01-30 Thread Sean Davis
w.whitebeam.org/ Sean > > On Friday 30 January 2009 13:24:59 Sean Davis wrote: > > On Fri, Jan 30, 2009 at 7:09 AM, Reg Me Please >wrote: > > > I'd like to write part of the application in Javascript, server side, > not > > > in > > > the web page. >

Re: [GENERAL] Help with a very newbie question...

2005-02-23 Thread Sean Davis
On Feb 23, 2005, at 6:14 AM, Andre Schnoor wrote: CREATE sp_getuser(name, pass) RETURNS record AS $body$ DECLARE retval RECORD; BEGIN SELECT INTO retval * FROM Users WHERE userid=name AND passwd=pass; IF NOT FOUND THEN RETURN NULL; ELSE RETURN retval; END; $body$ LAN

[GENERAL] Emacs and postgres

2005-02-23 Thread Sean Davis
This is a bit off-topic Does anyone know of an interface between emacs and psql? I currently use it as my default editor and do my share of save and then \i. I just gave pgEdit a try and liked many aspects of it, but I still like Emacs as an editor and wondered if anyone else has tricks/pl

Re: [GENERAL] postgresql 8.0 advantages

2005-02-25 Thread Sean Davis
On Feb 25, 2005, at 9:41 AM, Si Chen wrote: Hello. I read the PostgreSQL 8.0 "What's New" page (http://www.postgresql.org/docs/whatsnew) and wasn't sure whether version 8.0 is significantly faster, more scalability, or more stable than versions 7.4? I remember big speed improvements between 7.3

Re: [GENERAL] Reading from Mysql & writting in PGsql

2005-02-28 Thread Sean Davis
You will have to export from mysql and then insert into postgresql. If you are using postgresql 8 or above, you can use dbi-link (http://pgfoundry.org/projects/dbi-link/) to set up a view in your postgresql for the table in mysql and select directly from it. Sean - Original Message -

Re: [GENERAL] GUI

2005-03-01 Thread Sean Davis
If you are into perl, you should definitely look at Class::DBI (http://www.class-dbi.com) which is freely available from CPAN (despite the .com site). It treats table rows as objects with methods. It can model foreign key relationships based entirely on the database schema (and entirely autom

Re: [GENERAL] Novice Question

2005-03-01 Thread Sean Davis
On Mar 1, 2005, at 4:23 PM, Michael Romagnoli wrote: I am new to postgresql, having previously worked with mysql mostly. What kind of command would I run if I wanted to copy an entire table (along with renaming it, and, of course, all data from the first table - some of which is binary)? Thanks,

Re: [GENERAL] pgadmin3 / postgresql newbie question

2005-03-02 Thread Sean Davis
Did you start the postmaster using '-i' to allow tcp/ip connections? Sean On Mar 2, 2005, at 6:15 AM, Jonathan Schreiter wrote: hi all, running amd64 fedora core 3 w/ default postgresql 7.4.7-3. did asu - , su postgres and createdb mydb as explained in the postgresql tutorial. installed the latest

Re: [GENERAL] GUI

2005-03-03 Thread Sean Davis
On Mar 3, 2005, at 4:36 PM, Tino Wildenhain wrote: Am Donnerstag, den 03.03.2005, 14:35 -0500 schrieb Hrishikesh Deshmukh: Hi All, A question about "joins" i have 17 tables in my postgres-DB how does one perform a join on these many tables!!! :( What are you trying to do? You have 17 total tables

Re: [GENERAL] keeping track of when a row was last modified

2005-03-10 Thread Sean Davis
On Mar 10, 2005, at 4:15 PM, Sally Sally wrote: Does postgres automatically keep track of when a row was last modified? Thanks No. If you look on the SQL list in the past ten-20 minutes, there has been a discussion about this issue. Generally, you can use a trigger to update a timestamp when a

Re: [GENERAL] Statement cancel or transaction cancel?

2005-03-11 Thread Sean Davis
On Mar 11, 2005, at 4:07 AM, Qingqing Zhou wrote: Pg8.0.1 backend> begin; backend> create table a (i int); backend> insert into a values(1); 1: i (typeid = 23, len = 4, typmod = -1, byval = t) backend> select * from pg_class; 1: relname (typeid = 19, len = 64, t

Re: [GENERAL] plPerl subroutine

2005-03-16 Thread Sean Davis
My understanding is that pl/perl functions are simply anonymous coderefs, so they can't call each other. What is it that you REALLY want to do? (The code looks a bit like a toy example.) Sean On Mar 16, 2005, at 9:17 AM, FERREIRA William (COFRAMI) wrote: hi   is it possible to create subroutin

Re: [GENERAL] Time Stamp

2005-03-21 Thread Sean Davis
Hrishi, Depending on what you are using the information for, you might want to think about using EXPLAIN ANALYZE like: EXPLAIN ANALYZE SELECT * FROM TEST_TABLE; This will give you the output of the explain command (describing what the query planner decided was the best plan) and the results of v

Re: [GENERAL] pl/perl problem

2005-03-22 Thread Sean Davis
On Mar 22, 2005, at 3:13 AM, FERREIRA William (COFRAMI) wrote: my function is very long but i found an example with the same comportment : CREATE OR REPLACE FUNCTION adoc.totoTest()   RETURNS int4 AS $BODY$  my $var = '->>>';  &concat($var);  sub concat {   $var .= 'tagada';  }  elog NOTICE, $var

Re: [GENERAL] Constraint problem

2005-03-22 Thread Sean Davis
On Mar 22, 2005, at 7:26 AM, Szmutku Zoltán wrote: Hi everybody ,   I try using Postgre, but  I have some problems. I create a constraint (  R1>=0 ), and after connect to server from VFP via ODBC . In the client program I turn on the transactions . (  SQLSETPROP(nHandle,'Transactions',2)   )   W

Re: [GENERAL] Question about function body checking and 8.1

2005-03-23 Thread Sean Davis
On Mar 22, 2005, at 10:04 PM, Tony Caduto wrote: Ok, here is a example CREATE OR REPLACE FUNCTION mytest(); RETURNS VOID as $$ DECLARE mytestvar varchar; mytestvar2 integer; BEGIN mytestvarr = 'bla'; select testfield from nonexistanttable where testfield = 2 INTO mytestvar2;

Re: [GENERAL] Extracting object source code from database to store in CVS...

2005-03-23 Thread Sean Davis
You can look at the system catalogs. In particular, look at: http://www.postgresql.org/docs/current/static/catalogs.html http://www.postgresql.org/docs/current/static/catalog-pg-proc.html You can do something like select proname,prosrc from pg_proc; as an example. You could use one of the procedu

Re: [GENERAL] PLPGSQL

2005-03-23 Thread Sean Davis
On Mar 23, 2005, at 7:56 AM, Shaun Clements wrote: Is there no way in pgplsql to call on a dynamic column. I need to be able to dynamically determine the latest month column within a dataset, and to get that columns data. I am unfamiliar with other languages within Postgres Kind Regards, Shaun

Re: [GENERAL] PLPGSQL

2005-03-23 Thread Sean Davis
On Mar 23, 2005, at 8:51 AM, Shaun Clements wrote: Hi Sean Ive chosen the table structure on purpose. Im transforming data from one table to another. The problem is still there. I receive the column name from a query in one table, and then need to update the table with that column name in anoth

Re: [GENERAL] about blob type

2005-03-28 Thread Sean Davis
You might want to look at:   http://www.postgresql.org/docs/8.0/interactive/largeobjects.html   or at the binary type in Postgres, also in the docs.   Sean   - Original Message - From: dbalinglung To: [email protected] Sent: Monday, March 28, 2005 4:39 AM

Re: [GENERAL] Views!

2005-03-29 Thread Sean Davis
Have a look at schemas: http://www.postgresql.org/docs/current/static/ddl-schemas.html Sean On Mar 29, 2005, at 8:27 AM, Hrishikesh Deshmukh wrote: Hi All, I have 254 tables, i want to "subset" it in 237 and 17 tables?! Is creating views the answer?/ Is there a better way to "subset" them? Thanks,

Re: [GENERAL] plperl doesn't release memory

2005-03-30 Thread Sean Davis
As I understand it, a single execution of a pl/perl function will not be affected by the perl memory issue, so I don't think that is your problem. My guess is that you are reading a large query into perl, so the whole thing will be kept in memory (and you can't use more memory than you have).

Re: [GENERAL] SELECT INTO Array?

2005-04-02 Thread Sean Davis
- Original Message - From: "Zitan Broth" <[EMAIL PROTECTED]> To: "Michael Fuhr" <[EMAIL PROTECTED]> Cc: Sent: Friday, April 01, 2005 9:00 PM Subject: Re: [GENERAL] SELECT INTO Array? Hi Michael, Good question :-) I am writing a function that has a row of data passed into it as variables

Re: [GENERAL] getting information of tables and indexes

2005-04-02 Thread Sean Davis
You can query the information schema:   http://www.postgresql.org/docs/8.0/static/information-schema.html   More specifically:   http://www.postgresql.org/docs/8.0/static/infoschema-columns.html   Hope that answers your question.   Sean   - Original Message - From: Srikanth Utpa

Re: [GENERAL] general purpose full text indexing

2005-04-02 Thread Sean Davis
- Original Message - From: "Avishai Weissberg" <[EMAIL PROTECTED]> To: Sent: Monday, March 28, 2005 2:00 PM Subject: [GENERAL] general purpose full text indexing Hello, I am trying to find a suitable FTI component. I am aware of tsearch2, but as far as I understand it doesn't really sui

Re: [GENERAL] How to query pgsql from a BASH script ?

2005-04-03 Thread Sean Davis
Michelle, There may be other answers for this, but if you need to connect 2-3 times per second, you probably need a persistent connection which, as far as I know, can't be obtained (and maintained) from bash. Is there a reason not to do this from the server side or even from a standard client-s

Re: [GENERAL] CentOS questions (From MySQL -> PGSQL)

2005-04-06 Thread Sean Davis
On Apr 6, 2005, at 10:50 AM, Erick Papadakis wrote: Hi, Some newbie questions that the archive search did not help me with. 1. Will PGSQL work on CentOS? Should I download RH Enterprise 3.0 binaries? Or RedHat 9.0 binaries? 2. Is there a startup kit with 6-7 easy install steps for a TOTAL NEWBIE? M

Re: [GENERAL] Improvement for COPY command .. unless it already exists

2005-04-07 Thread Sean Davis
On Apr 7, 2005, at 10:33 AM, David Gagnon wrote: Hi, I want to default some columns for this COPY command only. So DEFAULT is not appropriate in this case. In fact I think you suggested a workaround right ? Doing an alter table before and another one after will work ... not fully clean though

Re: [GENERAL] Iterate OLD/NEW columns in a trigger?

2005-04-07 Thread Sean Davis
On Apr 7, 2005, at 3:44 PM, Scott Marlowe wrote: On Thu, 2005-04-07 at 14:35, Steve - DND wrote: Is there a way to iterate the columns contained on the OLD/NEW. I want to do some work in a function in a trigger, but I want it to be generic. I don't want to have to create a separate trigger for ea

Re: [GENERAL] [SQL] Problems with Set Returning Functions (SRFs)

2005-04-11 Thread Sean Davis
On Apr 6, 2005, at 2:53 PM, Otto Blomqvist wrote: secom=# select f1, f2, f3 from testpassbyval(1, (Select number1 from test)); ERROR: more than one row returned by a subquery used as an expression This is where I fail. Am I even on the right path here ? Writing the actual parsing function will

Re: [GENERAL] psql vs perl prepared inserts

2005-04-13 Thread Sean Davis
On Apr 13, 2005, at 4:12 AM, Dawid Kuroczko wrote: On 4/12/05, Matt Van Mater <[EMAIL PROTECTED]> wrote: I've been experimenting with loading a large amount of data into a fairly simple database using both psql and perl prepared statements. Unfortunately I'm seeing no appreciable differences betwee

Re: [GENERAL] psql vs perl prepared inserts

2005-04-13 Thread Sean Davis
On Apr 13, 2005, at 9:57 AM, Matt Van Mater wrote: Thanks to all who replied. Thanks for the tip on that last thread Tom, I don't know how I missed it. I have a hunch that it's not applicable to me at this time because I'm running a year and a half old software (included in OpenBSD 3.4), but I wi

Re: [GENERAL] PostgreSQL and Schema (pictures)

2005-04-15 Thread Sean Davis
You would probably benefit from a quick search of the archives. There are numerous tools for doing this. On Apr 15, 2005, at 10:26 AM, Hrishikesh Deshmukh wrote: Hi All, I have a db in postgresql (Win, 8.0). Is there any software that i can use to connect to DB and get ER diagram(pictures) of t

Re: [GENERAL] [SQL] How to add 1 hour in a date or time stamp?

2005-04-18 Thread Sean Davis
Dinesh,   The documentation is very helpful for this topic.  Typing 'add 1 hour timestamp' into the search box at:   http://www.postgresql.org/docs/8.0/interactive/index.html   yields the following page as the first hit:   http://www.postgresql.org/docs/8.0/static/functions-datetime.html   Sea

Re: [GENERAL] PRIMARY KEY and indexes

2005-04-23 Thread Sean Davis
- Original Message - From: "Craig Bryden" <[EMAIL PROTECTED]> To: "pgsql" Sent: Saturday, April 23, 2005 5:45 AM Subject: [GENERAL] PRIMARY KEY and indexes Hi I come from a MS-SQL background and I'm trying to get some clarity on indexes in Postgres. If anyone can help with the following

Re: [GENERAL] pl/perl problem

2005-03-21 Thread Sean Davis
Title: RE: [GENERAL] Convert Cursor to array   - Original Message - From: FERREIRA William (COFRAMI) To: '[email protected]' Sent: Monday, March 21, 2005 9:22 AM Subject: [GENERAL] pl/perl problem hi   i wrote a store procedure using the pl/pe

Re: [GENERAL] pgadminIII - creating servers

2005-04-26 Thread Sean Davis
On Apr 25, 2005, at 10:54 PM, [EMAIL PROTECTED] wrote: I just now tried creating a second server with pgadminIII.    I am confused as to why one would have more than one server.  There does not seem to be any way to "switch" from one server to another, or to log into one particular server (and n

Re: [GENERAL] Query Designer

2005-04-27 Thread Sean Davis
Particularly if you have a set of queries that are used often, you could certainly build a framework for doing this. See: http://genome.ucsc.edu/cgi-bin/hgTables as an example. There are many others, I would imagine. Perl, ruby, and probably Java and python offer database abstraction tools th

Re: [GENERAL] populating a table via the COPY command using C code.

2005-04-27 Thread Sean Davis
On Apr 27, 2005, at 4:48 PM, Mak, Jason wrote: What's your thoughts?? which approach would be the fastest? 1) 2 step process. 2) realtime PQputCopyData - not sure how this would work with 3 different tables. 3) COPY tablename FROM 'filename' thanks, jason. COPY tablename FROM 'filename' is VERY

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Sean Davis
Yes, pl/pgsql needs to be written as a function. If you want to "script" things, that is done in SQL or via one of the interfaces for perl, python, java, etc. You can just do the DROP TABLE, ignore the error message if the table doesn't exist, and then create the table. The documenation is qu

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Sean Davis
- Original Message - From: "Craig Bryden" <[EMAIL PROTECTED]> To: "Sean Davis" <[EMAIL PROTECTED]>; "pgsql" Sent: Monday, May 02, 2005 8:05 AM Subject: Re: [GENERAL] scripts in Postgres Hi Thanks for the reply. Since I don't intend using any of t

Re: [GENERAL] scripts in Postgres

2005-05-02 Thread Sean Davis
the "drop if exists" functionality. See here. http://archives.postgresql.org/pgsql-novice/2004-10/msg00158.php Sean - Original Message - From: "Craig Bryden" <[EMAIL PROTECTED]> To: "Sean Davis" <[EMAIL PROTECTED]>; "pgsql" Sent: Monday, May 02,

Re: [GENERAL] Persistent Connections in Webserver Environment

2005-05-02 Thread Sean Davis
I have only a few connections, but I just connect with the equivalent of your "apache" user. My database is pretty much query-only with a few exceptions that are not "sensitive". But for you, could you just write a stored function to do the transaction and write the audit trail for data-alter

Re: [GENERAL] scripts in Postgres

2005-05-03 Thread Sean Davis
On May 3, 2005, at 2:50 AM, Rolf Østvik wrote: [EMAIL PROTECTED] ("Craig Bryden") wrote in news:[EMAIL PROTECTED]: Hi Sean Thanks for that. Does psql work differently to pgAmin III's Query program? I have tried exactly what you showed me below, and it did not work. It seems like the script stops on

Re: [GENERAL] getting the ranks of items

2005-05-03 Thread Sean Davis
How about something like: CREATE TABLE testrank ( id int, value varchar ); insert into testrank values(17,'way'); insert into testrank values(27,'foo'); insert into testrank values(278,'bar'); insert into testrank values(1,'abd'); insert into testrank values(2,'def'); CREATE OR REPLACE FUNCTION r

Re: [GENERAL] Postgres and GnuPlot

2005-05-09 Thread Sean Davis
As an alternative, be sure to check out pl/R. Everything happens inside the server except for the actual plot which goes to a file. Sean - Original Message - From: "Hrishikesh Deshmukh" <[EMAIL PROTECTED]> To: "Ben" <[EMAIL PROTECTED]> Cc: "Postgresql-General" Sent: Monday, May 09, 200

Re: [GENERAL] Please Recommend a Front End App

2005-05-12 Thread Sean Davis
On May 12, 2005, at 7:44 PM, John DeSoi wrote: On May 12, 2005, at 7:06 PM, Kurt Gibson wrote: One important solution I created in Filemaker Pro requires very detailed and exact replication of official court forms with database data entered on the forms. Imagine a form with small type, boxes and

Re: [GENERAL] postgres 7.4 array count

2005-05-18 Thread Sean Davis
Does array_dims give you the answer you like? http://www.postgresql.org/docs/8.0/interactive/functions- array.html#ARRAY-OPERATORS-TABLE Sean On May 18, 2005, at 4:35 AM, Margus Roo wrote: Hello. Is there any good solution to count elements from array field? Reg, Margusja

Re: [GENERAL] Count and Results together

2005-05-18 Thread Sean Davis
On May 18, 2005, at 3:07 AM, Jan Sunavec wrote: Hi Is possible use SELECT NUM_ROWS, a, b, c FROM blabla WHERE x =id; I mean it's much more faster than SELECT a, b, c FROM blabla WHERE x =id; and then SELECT count(*) FROM blabla WHERE x =id; Can you do this on the client side? What client/interfa

Re: [GENERAL] analyze at startup?

2005-05-19 Thread Sean Davis
See here for more details: http://www.postgresql.org/docs/8.0/static/maintenance.html In short, you don't need to do a vacuum analyze for each connection--it is a database-specific or table-specific task, not a connection-specific one. You can use vacuum analyze when you think things have chang

Re: [GENERAL] writting a large store procedure

2005-06-02 Thread Sean Davis
I have to recommend pgEdit (nearly free and does have a nearly fully-functional test version). Sean On Jun 2, 2005, at 3:57 AM, Rodríguez Rodríguez, Pere wrote: Hello, I'm writing a large store procedures (more than 700 lines) and I have much problems to debug it. How can I debug it easily?

Re: [GENERAL] Limits of SQL

2005-06-02 Thread Sean Davis
A couple of links: http://www.dbazine.com/ofinterest/oi-articles/celko24 http://www.dbmsmag.com/9603d06.html On Jun 2, 2005, at 2:33 AM, Joachim Zobel wrote: Hi. I am looking for a way to write a SELECT that finds connectivity components of a graph or at least for one that given two nodes de

Re: [GENERAL] Test for array slice?

2005-06-03 Thread Sean Davis
On Jun 3, 2005, at 12:32 PM, Joe Conway wrote: Peter Fein wrote: I want to do something like this (pardon my pseudocode): A=ARRAY[4, 5, 6, 7, 8] B=ARRAY[5, 6] is_sliceof(A, B), i.e., there exists a slice of A that equals B. My best thought ATM is to convert both to strings and use pattern ma

Re: [GENERAL] Large Object => invalid input syntax for integer: ""

2005-06-06 Thread Sean Davis
- Original Message - From: "Adam Witney" <[EMAIL PROTECTED]> To: "grupos" <[EMAIL PROTECTED]>; "pgsql-general" Sent: Monday, June 06, 2005 8:17 AM Subject: Re: [GENERAL] Large Object => invalid input syntax for integer: "" On 6/6/05 4:58 am, "grupos" <[EMAIL PROTECTED]> wrote: I

Re: [GENERAL] Copying data from int column to array column

2005-06-08 Thread Sean Davis
On Jun 8, 2005, at 8:21 AM, Adam Witney wrote: Hi, I am trying to copy the data from an integer column into an array column in the same table. Something like this CREATE TABLE test (field1 INT, field2 INT, field3 INT[]); INSERT INTO test VALUES(1); INSERT INTO test VALUES(2); INSERT INTO

Re: [GENERAL] postgres and ggobi/xgvis

2005-06-09 Thread Sean Davis
On Jun 8, 2005, at 7:39 PM, Hrishikesh Deshmukh wrote: Hi All, How easy or difficult is it to get ggobi/xgvis working with postgresql?! Is it possible to write a query and send the output straight to ggobi/xgvis without much work? Any pointers. I would think that you would need to constru

Re: [GENERAL] [SQL] Permission denied for language pltclu

2005-06-10 Thread Sean Davis
On Jun 10, 2005, at 5:51 AM, Dinesh Pandey wrote: Hi Richard/ Michael   Thanks for your great help.   I got the problem.   Actually, I was not getting the cause of this problem, because it was working properly at our end.   Actually this problem occurs when the function is being created by t

Re: [GENERAL] postgres and xml

2005-06-10 Thread Sean Davis
On Jun 10, 2005, at 12:02 PM, Bruce Momjian wrote: Hrishikesh Deshmukh wrote: Hi All, Is there a way that makes it possible to export sql query results as a xml file? I use postgres 7.4.7 on a debian system. Do i need any packages to export query results as a xml file if its possible? No,

Re: [GENERAL] return next and pl/perl

2005-06-10 Thread Sean Davis
- Original Message - From: "Eric E" <[EMAIL PROTECTED]> To: Sent: Friday, June 10, 2005 7:24 PM Subject: [GENERAL] return next and pl/perl Hi all, I'm working on implementing a function in PL/PERL that will ready many rows. As such I'd like to use return_next to keep memory usa

[GENERAL] CVS stability

2005-06-12 Thread Sean Davis
I've been noticing some very useful things that are probably already in CVS (return_next in pl/perl, IN/OUT parameters, and probably others). I don't have a "mission critical" production environment and was wondering how unstable a typical 8.1 CVS checkout is? I'm not talking about feature-fr

Re: [GENERAL] [HACKERS] mirroring oracle database in pgsql

2005-06-13 Thread Sean Davis
There is DBI-link, but this probably isn't an "enterprise" solution http://www.pervasive-postgres.com/postgresql/tidbits.asp Sean On Jun 13, 2005, at 2:31 PM, Jonah H. Harris wrote: The contrib/dblink module only works for creating a database link to another PostgreSQL database. I'm work

Re: [GENERAL] [HACKERS] mirroring oracle database in pgsql

2005-06-13 Thread Sean Davis
leveraged. Sean Sean Davis wrote: There is DBI-link, but this probably isn't an "enterprise" solution http://www.pervasive-postgres.com/postgresql/tidbits.asp Sean ---(end of broadcast)--- TIP 3: if posting/reading throu

Re: [GENERAL] return next and pl/perl

2005-06-13 Thread Sean Davis
Eric, You might check out this thread: http://archives.postgresql.org/pgsql-general/2005-06/msg00527.php Someone can almost certainly point to a better thread, but it is a start Sean On Jun 13, 2005, at 12:41 PM, Eric E wrote: Hi David, I ended up doing what you suggest, and it seems

Re: [GENERAL] pg_dumpall

2005-06-16 Thread Sean Davis
See: http://www.postgresql.org/docs/8.0/static/app-pg-dumpall.html If you need more specifics, you will probably need to give more specifics like OS and version. Sean On Jun 16, 2005, at 5:16 AM, Zlatko Matić wrote: How to start pg_dumpall ? ---(end of broadcast)-

Re: [GENERAL] Executing SQL Script

2005-06-16 Thread Sean Davis
On Jun 15, 2005, at 9:47 PM, Jamie Deppeler wrote: This is a simple question what is the best way to execute a SQL script, this script will create schemas and tables for a database i created. Nearly all clients or interfaces provide a means to execute arbitrary SQL. You can do so in PgAd

Re: [GENERAL] Dynamic SQL

2005-06-16 Thread Sean Davis
On Jun 16, 2005, at 6:21 AM, Craig Bryden wrote: Hi I am trying to get information on how to do "Dynamic SQL" in PostgreSQL (preferably pg/plsql). Please can someone give an exaple of how this is done or direct me to the relevant documentation. There is searchable documentation here (book

Re: [GENERAL] Making the DB secure

2005-06-17 Thread Sean Davis
On Jun 17, 2005, at 8:49 AM, Együd Csaba wrote: Hi, we plan to make available our database from the internet (direct tcp/ip based connections). We want to make it as secure as possible. There are a few users who could access the database, but we want to block any other users to access. Our p

Re: [GENERAL] Multiple COPYs

2005-06-17 Thread Sean Davis
On Jun 16, 2005, at 12:32 PM, [EMAIL PROTECTED] wrote: Hello, Having a great time with PG - ported an erp from oracle and db2. First I tried MySql but choked somewhere in the 900 table region. I have a python script to translate the syntax and it loads about 2000 tables. Now I want to COPY my

Re: [GENERAL] subqueries

2005-06-19 Thread Sean Davis
- Original Message - From: "Tomasz Grobelny" <[EMAIL PROTECTED]> To: Sent: Sunday, June 19, 2005 6:12 PM Subject: [GENERAL] subqueries I have such a statement: select * from (subquery1) as foo, (subquery2) as bar; Both subqueries are reasonably fast (<0.5s) and generate results that

Re: [GENERAL] Debugging PL/pgSQL

2005-06-21 Thread Sean Davis
You might want to look at pgEdit. Sean - Original Message - From: "Craig Bryden" <[EMAIL PROTECTED]> To: "pgsql" Sent: Tuesday, June 21, 2005 3:01 PM Subject: [GENERAL] Debugging PL/pgSQL Hi Does anyone know of a free SQL Editor that allows you to debug PL/pgSQL functions? Than

Re: [GENERAL] Debugging PL/pgSQL

2005-06-21 Thread Sean Davis
Ah, yes  I should have qualified my statement a bit.  Sorry if I was misleading   Sean   - Original Message - From: Bob To: Sean Davis Cc: Craig Bryden ; pgsql Sent: Tuesday, June 21, 2005 4:57 PM Subject: Re: [GENERAL] Debugging PL/pgSQL Keep in

Re: [GENERAL] MacOSX, fink, missing readline/readline.h

2005-06-26 Thread Sean Davis
- Original Message - From: "John DeSoi" <[EMAIL PROTECTED]> To: "Teunis Peters" <[EMAIL PROTECTED]> Cc: "PostgreSQL general" Sent: Sunday, June 26, 2005 6:13 PM Subject: Re: [GENERAL] MacOSX, fink, missing readline/readline.h On Jun 26, 2005, at 4:29 PM, Teunis Peters wrote: This

Re: [GENERAL] Explain Analyse never returns .. maybe a bug

2005-06-29 Thread Sean Davis
- Original Message - From: "David Gagnon" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, June 29, 2005 9:25 AM Subject: [GENERAL] Explain Analyse never returns .. maybe a bug Hi all, I stop the following statement after 3 minutes explain analyse select * From IC whe

Re: [GENERAL] temporary tables ?

2005-07-22 Thread Sean Davis
On Jul 22, 2005, at 1:55 PM, Zlatko Matic wrote: Hello. I have some tables that are updated by several users in the same time and are used in queries for reports. Those tables have rows that are actualy copied from original tables that are not to be altered. There is a procedure that insert

Re: [GENERAL] temporary tables ?

2005-07-23 Thread Sean Davis
What is the influence on database growing in comparrison to permanent table frequently inserted/deleted rows ? The tables are dropped automatically after the connection is closed. The database doesn't grow because of temporary tables. As for comparison to a frequently inserted/deleted ta

Re: [GENERAL] get sequence from remote server

2005-07-24 Thread Sean Davis
On Jul 24, 2005, at 3:23 PM, Stefan wrote: Hi, is there a way to get a sequence from another Postgres-Server? I have some "data servers" an one admin server. When a new row is inserted on one of the data servers, the server should ask automatically for a sequence number from the admin serve

Re: [GENERAL] Is there something like Mssql GUID in PostgreSql

2005-07-29 Thread Sean Davis
Title: Re: [GENERAL] Is there something like Mssql GUID in PostgreSql database On 7/29/05 8:04 AM, "Dragan Matic" <[EMAIL PROTECTED]> wrote: We are currently migrating a database from Ms Sql server to PostgreSQL. So far replication was done using GUID (global unique identifier) fields which i

[GENERAL] Alter privileges for all tables

2005-08-01 Thread Sean Davis
Sorry to ask this again, but I seem to have misplaced the original discussion and can't find it in the archives--could someone point me to the thread on functions to batch alter privileges on all tables (or a subset) in a database? Thanks, Sean ---(end of broadcast)--

Re: [GENERAL] psqsl -> remote db

2005-08-04 Thread Sean Davis
On 8/4/05 2:26 PM, "Andrew Stewart" <[EMAIL PROTECTED]> wrote: > I'm sorry, I'm sure I should be asking this someplace more general, but > apparantly the word 'port' is used in so many different contexts that a > google search turns up fruitless ;) > > I'm just trying to access a remote postgresq

  1   2   >