Re: [SQL] mail alert

2009-08-14 Thread Christopher Browne
queue processors -- output = reverse(ofni.sailifa.ac @ enworbbc) Christopher Browne Bother, said Pooh, Eeyore, ready two photon torpedoes and lock phasers on the Heffalump, Piglet, meet me in transporter room three -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes

Re: [SQL] Field or record level encryption / decryption

2009-08-14 Thread Christopher Browne
referring to the fine manual... http://www.postgresql.org/docs/8.3/static/pgcrypto.html -- output = reverse(ofni.sailifa.ac @ enworbbc) Christopher Browne Bother, said Pooh, Eeyore, ready two photon torpedoes and lock phasers on the Heffalump, Piglet, meet me in transporter room three -- Sent via

Re: [SQL] Desc Commnad in pgsql?

2008-04-19 Thread Christopher Browne
The world rejoiced as [EMAIL PROTECTED] (VG) wrote: Hello All, I like to know how can I achieve the same functionality that is give by desc commnad in mysql or oracle. Also specify me the book related to pgsql as a beginner. Presently my task is going to be communication of ruby with pgsql

Re: [SQL] Create Assertion -- Question from a newbie

2006-08-30 Thread Christopher Browne
[EMAIL PROTECTED] (Andrew Sullivan) wrote: On Wed, Aug 30, 2006 at 04:47:29PM -0400, Gregory Stark wrote: Do *any* databases implement SQL standard Assertions? Somebody must've had an implementation, or it'd never have made it into the spec ;-) Supposedly, RDB had this feature... Of

Re: [SQL] RES: Lock Problem

2006-08-24 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (André José Guergolet) would write: Sorry, I have a table with 360 rows, in this table I control the state of machines on network: IpState StateDate 172.20.0.39 Running 2006-08-23 00:00:00

Re: [SQL] sql error creating function

2006-08-11 Thread Christopher Browne
Quoth [EMAIL PROTECTED] (TJ O'Donnell): When I psql -f f.sql I get the following error: psql:f.sql:10: ERROR: relation fragset does not exist CONTEXT: SQL function fragments cat f.sql Create Or Replace Function fragments(character varying) Returns setof character varying As $$ Create

Re: [SQL] Good examples of calling slony stored procedures

2006-06-14 Thread Christopher Browne
Martha Stewart called it a Good Thing when [EMAIL PROTECTED] (Mark Adan) wrote: I looked there already and didn't find what I needed. I saw this web page from cbbrowne and he briefly talked about using bare metal slony functions, but doesn't have any examples. If you look at the source code

Re: [SQL] Merging rows into one result?

2006-03-11 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Jesper K. Pedersen) would write: Is it possible to use SQL to merge data into one result? A theorethical example to explain: tbl_test ( id integer, information varchar(25)) id | information ---+-- 1 | Yo 2 |

Re: [SQL] Extract table columns in tabular form

2005-11-05 Thread Christopher Browne
How do you extract postgresql column names, types and comments in tabular form, using an SQL command?. I know they are stored in one of the system tables, but I don't know which. - Table names are in pg_class - Column names are in pg_attribute, associated to pg_class via where

Re: [SQL] Design question: Scalability and tens of thousands of tables?

2005-11-04 Thread Christopher Browne
On Nov 4, 2005, at 9:47 AM, [EMAIL PROTECTED] wrote: The problem is I am very concerned about scalability with having a different table created for each custom object. I want to design to site to handle tens of thousands of users. If each user has 3-5 custom objects the database would

Re: [SQL] How to secure PostgreSQL Data for distribute?

2005-08-18 Thread Christopher Browne
Premsun Choltanwanich wrote: Dear All, I need to distribute my application that use PostgreSQL as database to my customer. But I still have some questions in my mind on database security. I understand that everybody who get my application database will be have a full control

Re: [SQL] REINDEX DATABASE

2005-07-26 Thread Christopher Browne
Hello Would you like to advice to use REINDEX DATABASE on regular basis ? if (yes) how it should be connected with VACUUM FULL ANALYZE which is run regularly ? (reindex before vacuum or vacuum before reindex?) else haw to determine _when_ to run REINDEX ? If you are doing ordinary

Re: [SQL] Make COUNT(*) Faster?

2005-07-08 Thread Christopher Browne
I'm also claiming that a true count for any active table is meaningless and am *not* suggesting that effort be spent on trying to produce such a true count. That's a pretty big assumption that would in fact be WRONG. We have managers interested in counting the number of objects we have around

Re: [SQL] How to select from many database ??

2005-04-23 Thread Christopher Browne
Oops! [EMAIL PROTECTED] (Art - Feping) was seen spray-painting on a wall: i want to select from many databases, for example , i want to select table master in database A, and table master in database B. can i do it like this :select * from A.Master, B.Master just like in SQL Server ??

Re: [SQL] Debet-Credit-Balance Calculation

2005-04-19 Thread Christopher Browne
Oops! [EMAIL PROTECTED] (Muhyiddin A.M Hayat) was seen spray-painting on a wall: everything is ok, but when record 100 that query eat all my cpu process and take a long time, i have wait for 3 mimutes but query doesn't finish. (pgsql-8.0-1 running on Dual Xeon 2.8 and 2GB of RAM) What

Re: [SQL] Nested Sets

2005-04-16 Thread Christopher Browne
After takin a swig o' Arrakan spice grog, [EMAIL PROTECTED] (Troels Arvin) belched out: On Sat, 16 Apr 2005 14:14:57 -0400, Andrew Sullivan wrote: You shouldn't need to do anything special around table locking. - Except of one wants True Serializability (see chapter 12.2 in the manual). But

Re: [SQL] Postgres performance

2005-03-03 Thread Christopher Browne
[EMAIL PROTECTED] (PFC) writes: The reason PostgreSQL is slower is because it (and by extension the team behind it) cares about your data. Sure, postgres is (a bit but not much) slower for a simple query like SELECT * FROM one table WHERE id=some number, and postgres is a lot slower

Re: [SQL] postgressql.org

2004-12-13 Thread Christopher Browne
president), instead of whitehouse.gov, its actual address. postgressql.org seems of pretty dubious value; I wouldn't worry too much about it. -- cbbrowne,@,ca.afilias.info http://dev6.int.libertyrms.com/ Christopher Browne (416) 673-4124 (land) ---(end of broadcast

Re: [SQL] create stored procedure from temporary table

2004-11-29 Thread Christopher Browne
Oops! [EMAIL PROTECTED] (Nurdin) was seen spray-painting on a wall: i was wondering, how to create dynamic table like temporary table but create from function and the result from function toocos i want count same calculation from other table migh be a multiple table so i need looping and

Re: [SQL] Scheduling Jobs In PostgreSQL

2004-11-07 Thread Christopher Browne
Martha Stewart called it a Good Thing when [EMAIL PROTECTED] (Chethana Kuloor) wrote: Is it possbile to schedule jobs in postgres? No. You may schedule jobs using cron. -- select 'cbbrowne' || '@' || 'ntlug.org'; http://linuxfinances.info/info/spiritual.html If you were to implement this in

Re: [SQL] Export tab delimited from mysql to postgres.

2004-10-11 Thread Christopher Browne
Quoth [EMAIL PROTECTED] (Theo Galanakis):     Could you provide a example of how to do this?     I actually ended up exporting the data as Insert statements, which strips out cf/lf within varchars. However it takes an eternity to import 200,000 records... 24 hours infact Is this

Re: [SQL] How to check postgres running or not ?

2004-09-18 Thread Christopher Browne
In an attempt to throw the authorities off his trail, [EMAIL PROTECTED] (Sandeep Gaikwad) transmitted: Hello Sir, I want to know how to check whether postgres database is running or not ? when I give command like ./postmaster -i , whether all databases in that postgres will

Re: [SQL] what is maximum size of text datatype in postgres?

2004-09-13 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Smit) would write: i wanted to know, what is maximum size of text datatype in postgres. It is given as unlimited characters in the postgres documentation. But it doesn't store characters more than 5000. The connection get lost if i

Re: [SQL] Secure DB Systems - How to

2004-07-14 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Rajesh Kumar Mallah) wrote: Sarah Tanembaum wrote: I was wondering if it is possible to create a secure database system usingPostgreSQL/PHP combination? I have the following in mind: I wanted to store all my( and my brothers and sisters)

Re: [SQL] User defined types -- Social Security number...

2004-06-06 Thread Christopher Browne
In the last exciting episode, Greg Patnude [EMAIL PROTECTED] wrote: Thanks Josh -- I understand that there are valid and invalid SSN's -- similar rules apply to zip codes and area codes... I tried this: SELECT to_char(123456789, '000-00-'); which yields 123-45-6789 -- nicely, I might

Re: [SQL] plpgsql vs. SQL in stored procedures

2004-03-31 Thread Christopher Browne
[EMAIL PROTECTED] (Ivan Sergio Borgonovo) wrote: Is there a way to declare variables and use IF in plain SQL, not in plpgsql inside stored procedures? The forthcoming support for recursive queries using a WITH clause might provide, after a fashion, a way to declare variables. As for IF, there

Re: [SQL] Trying to make efficient all vendors who can provide all items

2004-03-08 Thread Christopher Browne
Clinging to sanity, [EMAIL PROTECTED] mumbled into her beard: My mind is drawing a blank. Please consider: TABLE 1: items: list of items in catalog item_id | item_description TABLE 2: vendors: list of vendors who provide 1 or more items vendor_id | vendor_name TABLE 3: item_vendors:

Re: [SQL] User defined types -- Social Security number...

2004-02-29 Thread Christopher Browne
The world rejoiced as [EMAIL PROTECTED] (Michael Chaney) wrote: Look, you're thinking way too hard on this. An SSN is a 9-digit number, nothing more. There are some 9-digit numbers which aren't valid SSN's, and you might want to get fancy and create a constraint for that. Regardless, you

Re: [SQL] Field list from table

2004-02-26 Thread Christopher Browne
Jan Pips [EMAIL PROTECTED] wrote: How can I, using SELECT, get the full list of fields from a given table? portfolio=# select column_name, data_type from information_schema.columns where table_catalog = 'portfolio' and table_schema = 'public' and table_name = 'stocktxns'; column_name |

Re: [SQL] postgresql multiple insert slow

2004-02-21 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Michael L. Hostbaek) would write: I runs fine - and I get no errors - but it takes almost 25 minutes to complete.. I tried running the script while just grabbing the rows from the oracle database and writing to a text file - and then

Re: [SQL] timestamptz - problems

2004-02-09 Thread Christopher Browne
Oops! [EMAIL PROTECTED] (Mark Roberts) was seen spray-painting on a wall: Hi im using 'timestamptz' in a function called: 'getdate' to enter the start and finish time into a db field, however the date appears to be inserted into the db in a random format, i wish for it to only be entered into

Re: [SQL] update more than 1 table (mysql to postgres)

2004-02-01 Thread Christopher Browne
Oops! [EMAIL PROTECTED] (treeml) was seen spray-painting on a wall: I am migrating from MySQL to Postagres. I have problem with postgres updating 2 tables with one statement. In MySQL I can update 2 tables (parent, child) with a statement like this UPDATE parent LEFT JOIN child ON parent.pid

Re: [SQL] comparing nulls

2004-01-20 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Kenneth Gonsalves) would write: On Tuesday 20 January 2004 19:26, Chris Bowlby wrote: Under 7.3.x this option was removed, you need to test via: SELECT * from table where field IS NULL; thanx - works in both 7.1 and 7.3 - why do

Re: [SQL] Stored Procedures

2003-12-28 Thread Christopher Browne
[EMAIL PROTECTED] (beyaRecords - The home Urban music) wrote: I am new to this list and the world of postgreSQL, and would like to know how create stored procedures in postgreSQL. Have you considered looking at the documentation? It is fairly well documented there. % man CREATE FUNCTION

Re: [SQL] Programatically switching database

2003-11-16 Thread Christopher Browne
Clinging to sanity, [EMAIL PROTECTED] (Tom Lane) mumbled into her beard: ow [EMAIL PROTECTED] writes: My concern though ... wouldn't pgSql server collapse when faced with transaction spawning across 100M+ records? No. You're extrapolating from Oracle-specific assumptions again. Or from

Re: [SQL] transaction management in plpgsql functions

2003-11-09 Thread Christopher Browne
After takin a swig o' Arrakan spice grog, Cris Carampa [EMAIL PROTECTED] belched out...: It seems that transaction management statements (begin work...commit work) are not allowed into plpgsql functions. Is it true? If true, what happens if I put a DML statement into a function? Is it

Re: [SQL] help me...

2003-11-09 Thread Christopher Browne
The world rejoiced as [EMAIL PROTECTED] (ron_tabada) wrote: Hello everyone, Good day! Could anyone help me translate this query in Microsoft Access to Postgresql. I'm having a difficulty. Pls... Query1: SELECT items.description, Sum(supplieditems.qty) AS SumOfqty FROM items INNER JOIN

Re: [SQL] SQL to PLC to diverter gate, can this be done?

2003-11-07 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Razorbak71) would write: First, I know nothing about PLC's, but I was wondering is there a way to extract data from a SQL database file, feed that to a PLC is some manner, and then have the PLC trigger a diverter gate based on the

Re: [SQL] A tricky sql-query...

2003-11-02 Thread Christopher Browne
Quoth [EMAIL PROTECTED] (Mark Stosberg): On 2003-10-22, Timo [EMAIL PROTECTED] wrote: You can't have any recursion in an pure sql-query, can you? It depends on how you think of recursion, I'd say. You join on the same table a number of times, by giving it a different alias each time. You

Re: [SQL] numeric and float converts to int differently?

2003-10-28 Thread Christopher Browne
group, and wherever you terminate it, you lose exactness. -- (reverse (concatenate 'string ofni.smrytrebil @ enworbbc)) http://dev6.int.libertyrms.com/ Christopher Browne (416) 646 3304 x124 (land) ---(end of broadcast)--- TIP 5: Have you checked our

Re: [SQL] Max input parameter for a function

2003-10-20 Thread Christopher Browne
After a long battle with technology,[EMAIL PROTECTED] (Kumar), an earthling, wrote: While trying to allocate about 36 input parameters, I got an error saying that the max input parameter for a function is only 32. Is it right? How to overcome this? Because I wanna insert records into a table

Re: [SQL] Which is faster SQL or PL/PGSQL

2003-10-19 Thread Christopher Browne
The world rejoiced as [EMAIL PROTECTED] (George A.J) wrote: i am converting an MSSQL database to Postgres. there is a lot of procedures to convert. which language is best for functions, SQL or plpgsql. which is faster . i am using postgres 7.3.2 Hmm? This doesn't seem to make much more

Re: [SQL] does postgresql execute unions in parallel?

2003-09-26 Thread Christopher Browne
[EMAIL PROTECTED] (Gaetano Mendola) writes: teknokrat wrote: If I have several selects joined with unions does postgresql execute the concurrently or not? nope. I was talking with Jan about that very idea yesterday; this would seem to be the place where PostgreSQL might take some (possibly

Re: [SQL] auto_increment

2003-09-20 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Muhyiddin A.M Hayat) wrote: Ok, but if i do rollback, the auto_increment don't roolback. Right, it's not supposed to. Think about the situation where you have 5 clients connecting to the database and adding records to this table. The current

Re: [SQL] Automated Backup

2003-09-19 Thread Christopher Browne
Oops! [EMAIL PROTECTED] (Kumar) was seen spray-painting on a wall: Is there a way to automate the backup databases using pg_dump (like in SQL server)? If you can come up with a way of automating the running of programs, then I imagine that might be possible. I have heard that a program called

Re: [SQL] virus warning

2003-09-19 Thread Christopher Browne
The world rejoiced as [EMAIL PROTECTED] (Richard Huxton) wrote: I've been getting something similar myself. Roughly 100 per day. Only 100, eh? I have been seeing that many per hour, give or take... -- aa454,@,freenet.carleton.ca http://cbbrowne.com/info/x.html People can be set wondering by

Re: [SQL] Datafiles for Databases

2003-09-19 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Kumar) wrote: I was looking for a structure like oracle or ms Sql server in Postgres. What I have expected is individual datafiles for individual databases. But i cant fine such items in the /usr/local/pgsql/data directory. Will the postgres

Re: [SQL] A simple way to Create type ...?

2003-09-16 Thread Christopher Browne
[EMAIL PROTECTED] (ow) writes: I had a look at create type docs and it seems somewhat complex, involving creation of functions and etc. I hope there's a simpler way for the following: How should one declare a new custom type, say, AddressType that corresponds internally to varchar(50). In

Re: [SQL] INSERT INTO ... SELECT

2003-08-14 Thread Christopher Browne
Centuries ago, Nostradamus foresaw when [EMAIL PROTECTED] (Silke Trissl) would write: I would like to insert into a table values from a table and user defined ones. Here is the example: I found this statement to insert values from another table: INSERT INTO test_table (cust_id, cust_name)

Re: [SQL] duplicate dates

2003-08-01 Thread Christopher Browne
precise about what you mean by 'date/time fields are the same'. They go down to fractions of a second, so you shouldn't have a huge number of collisions. -- output = (cbbrowne @ libertyrms.info) http://dev6.int.libertyrms.com/ Christopher Browne (416) 646 3304 x124 (land

[SQL] How can I to solute this problem?

2003-07-29 Thread Christopher Browne
manager. -- (reverse (concatenate 'string ofni.smrytrebil@ enworbbc)) http://dev6.int.libertyrms.info/ Christopher Browne (416) 646 3304 x124 (land) ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your