Re: [GENERAL] Does PG support updateable view?

2005-11-13 Thread A. Kretschmer
am 13.11.2005, um 17:04:37 -0800 mailte The Nice Spider folgendes: > Which version of PG support updatable view? None. Updateable views are a 'TODO'. http://www.postgresql.org/docs/faqs.TODO.html You can use Rules instead: http://www.varlena.com/varlena/GeneralBits/111.php, Issue 82-4 HTH, And

Re: [GENERAL] time zone - timestamp

2005-11-10 Thread A. Kretschmer
am 10.11.2005, um 14:58:14 +0100 mailte Maik Trömel folgendes: > Now, my question: > Why time zone "+02" in "2005-08-02 05:00:00+02"? And why "+01" in > "2005-11-10 14:16:41+01"? 2005-08-02: summertime 2005-11-10: normal time HTH, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heyn

Re: [GENERAL] Time trigger

2005-11-10 Thread A. Kretschmer
am 10.11.2005, um 12:46:33 +0100 mailte Piechu Piechu folgendes: > hello > > I'm new in this list, so sorry if my question seems stupid > > Is it possible to invoke store procedure because of time, I mean for > example I want my procedure to be invoked every ten minutes - what > should I do to r

Re: [GENERAL] script

2005-11-10 Thread A. Kretschmer
am 10.11.2005, um 10:10:22 +0100 mailte Maik Trömel folgendes: > Hello! > > I want to run a shell script with variables under Postgresql. > > An example: > I want to make the following query; > > select * from tablename where id=1; > select * from tablename where id=2; > select * from tab

Re: [GENERAL] Question on Insert / Update

2005-11-09 Thread A. Kretschmer
am 10.11.2005, um 1:45:46 +1100 mailte Alex folgendes: > Hi, > have just a general question... > > I have a table of 10M records, unique key on 5 fields. > I need to update/insert 200k records in one go. > > I could do a select to check for existence and then either insert or > update. > Or si

Re: [GENERAL] How to obtain the code af a function ?

2005-11-09 Thread A. Kretschmer
am 09.11.2005, um 5:40:14 -0800 mailte ctobini folgendes: > Hello, > > I would like to know how to liste the contain of a fonction. You can find this in information_schema.routines. > > Writing \df in psql, I have a list of functions and triggers, but and > don't know how to obtain the code

Re: [GENERAL] Debian packages

2005-11-09 Thread A. Kretschmer
am 09.11.2005, um 9:00:08 +0200 mailte Riaan van der Westhuizen folgendes: > Hi All > > > > Where do I find the Debian apt-get source path for PostgreSQL 8.1 deb http://people.debian.org/~mpitt/packages/sarge-backports/ / 8.1 on my sarge is running ;-) [EMAIL PROTECTED]:~$ echo "selec

Re: [GENERAL] How to create a virtual column

2005-11-06 Thread A. Kretschmer
am 06.11.2005, um 22:54:15 + mailte Chris folgendes: > Andreas Kretschmer spamfence.net> writes: > > Chris gmail.com> schrieb: > > > > > How do I create a virtaul column? > > > > A view. Example: > > Is a view completely compatible with tables? I mean, can I do everything with > a > view

Re: [GENERAL] md5 hash on table row

2005-11-02 Thread A. Kretschmer
am 02.11.2005, um 9:35:33 -0700 mailte Michael Fuhr folgendes: > test=> SELECT id, md5(textin(record_out(foo))) FROM foo; is 'record_out()' new in 8.1? Regards, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://ww

Re: [GENERAL] replace() and Regular Expressions

2005-11-01 Thread A. Kretschmer
am 01.11.2005, um 13:01:54 -0500 mailte DEV folgendes: > Currently I am running 8.0.1. Looks like an upgrade is in my future. Oh > Joy LOL > > am 31.10.2005, um 13:11:20 -0500 mailte DEV folgendes: > > Is is possible to use replace along with regular expression to remove any > > and all pun

Re: [GENERAL] replace() and Regular Expressions

2005-10-31 Thread A. Kretschmer
am 31.10.2005, um 13:11:20 -0500 mailte DEV folgendes: > Is is possible to use replace along with regular expression to remove any > and all punctuation from a field? Which version? PG 8.1 have a function 'regex_replace'. HTH, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heynitz:

Re: [GENERAL] function example?

2005-10-30 Thread A. Kretschmer
am 29.10.2005, um 20:39:23 -0700 mailte Matthew Peter folgendes: > Could someone help me and give me a basic example of > how to write a similiar functional function to the one > below that would use a dynamic table and update a > column only if it held a value. http://www.postgresql.org/docs/8.

Re: [GENERAL] Copy of a schema

2005-10-27 Thread A. Kretschmer
am 27.10.2005, um 11:13:43 +0200 mailte Frederic Massot folgendes: > Hi, > > I wonder whether it is possible to copy a schema with a postgreSQL command > like "copy_schema schema_src schema_dest" ? You can rename a schema. And, you can make a dump, then rename it, and then restore from backup.

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread A. Kretschmer
am 26.10.2005, um 10:22:27 -0300 mailte Rodrigo Gonzalez folgendes: > > > > > > > select version() > > Zlatko Mati? wrote: > type="cite"> > > > > Hello. >   > Is there any way to check the > version of PostgreSQL by a query? Maybe by querying catalog > tables? > Thanks

Re: [GENERAL] querying PostgreSQL version?

2005-10-26 Thread A. Kretschmer
am 26.10.2005, um 14:52:36 +0200 mailte Zlatko Mati? folgendes: > Hello. > > Is there any way to check the version of PostgreSQL by a query? Maybe by > querying catalog tables? > Thanks, select version(); HTH, Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heynitz: 035242/47212,

Re: [GENERAL] function that resolves IP addresses

2005-10-19 Thread A. Kretschmer
am 19.10.2005, um 14:36:46 +0200 mailte Marcel Gsteiger folgendes: > Hi all > > Does anybody know how I could create a database function that accepts > an INET parameter and reverse-lookups the hostname via DNS PTR lookup? > Something like the dnsname command line utility in the djbdns package. I

Re: [GENERAL] installation guide

2005-10-14 Thread A. Kretschmer
am 13.10.2005, um 23:36:26 -0700 mailte srikanth potluri folgendes: > hi , > > can any one send me the setailed step by step installaiton guide of > postgre-sql on linux . Which distribution? You should use the distribution packet system. http://www.oryx.com/ams/postgresql.html Regards, And

Re: [GENERAL] Question about stored procedures

2005-10-13 Thread A. Kretschmer
am 13.10.2005, um 3:36:19 -0700 mailte Josephine E. de Castro folgendes: > Hi everyone, > > I just want to know if there is an equivalent method in PostgreSQL > that acts like SQL Server's extended stored procedure. I want to run a > stored procedure that can update a file in the file system.

Re: [GENERAL] count( only if true)

2005-10-12 Thread A. Kretschmer
am 12.10.2005, um 20:42:02 +0200 mailte peter pilsl folgendes: > > the count-aggreate counts every expression that does not evaluate to null. > > I would like to have a count that counts all values that are true. > > Do I really need to make a count( case when expression then 't' else null) >

Re: [GENERAL] pg_restore --disable-triggers does not stop triggers

2005-10-06 Thread A. Kretschmer
am 06.10.2005, um 22:33:52 +0800 mailte CN folgendes: > Hi! > > 8.0.1 and 8.1 beta. > > Triggers are still fired although option --disable-triggers is applied > to pg_restore. The fired triggers abort pg_restore because of the > foreign keys violations. > > The following restore script used to

Re: [GENERAL] Dump all except some tables?

2005-10-06 Thread A. Kretschmer
am 06.10.2005, um 15:29:50 +0300 mailte WireSpot folgendes: > > > The only related option for both pg_dump and pg_restore is --table, which > > > only takes 1 (one) table name. If only it accepted more than one I > > > could've > > > found a workaround. > > > > You can use the -t more than once.

Re: [GENERAL] Dump all except some tables?

2005-10-06 Thread A. Kretschmer
am 06.10.2005, um 13:59:44 +0300 mailte WireSpot folgendes: > Is it possible to dump an entire database but to skip one or two tables? Or, > conversely, to restore an entire dump except for one or two tables? > (Although I'd prefer the first version.) > > The only related option for both pg_dump

Re: [GENERAL] Cast to integer

2005-10-05 Thread A. Kretschmer
am 05.10.2005, um 15:08:33 +0200 mailte Robert Osowiecki folgendes: > Hello! > > Anyone could explain to me, why cast(3.33 to int) works (from float, I > suppose) but cast('3.33' to int) (from text) does not? And what if I > create a cast for that: is it possibly dangerous? test=# select '3.3

Re: [GENERAL] PostgreSQL Database export from Linux to Windows

2005-10-05 Thread A. Kretschmer
am 05.10.2005, um 10:54:47 +0530 mailte Nitin Tarkar folgendes: > Dear All > > Kindly guid us to export PostgreSQL Database from linux to windows. Use pg_dump to export and psql/pg_restore to import. Read the man-page for pg_dump, particulary the different output formats. And, you should use th

Re: [GENERAL] export a select result in a file ?

2005-10-04 Thread A. Kretschmer
am 04.10.2005, um 5:00:16 -0700 mailte ctobini folgendes: > Hello, > > I don't find in the PostgreSQL doc how to export a select result in a > text file. > > Thanks if you can help me. You can use \o in psql to redirect the result to a file. \o out.file Regards, Andreas -- Andreas Kretschm

Re: [GENERAL] Connecting form Access or VB6 to PostgreSQL 8

2005-10-03 Thread A. Kretschmer
am 03.10.2005, um 18:48:03 +0530 mailte Aman Tur folgendes: > > > I have installed PostgreSQL 8 and latest pgODBC and ADO drivers but still I > am not able to connect to it from access or VB 6. Kindly help me. Instead HTML-mail with a picture you should better post a detailed error-message and

Re: [GENERAL] Get all table names that have a specific column

2005-09-30 Thread A. Kretschmer
am 30.09.2005, um 10:55:44 -0400 mailte Emi Lu folgendes: > Greetings, > > I am not very familiar with the system views/tables in postgreSQL. I'd like > to get all table names that have a column let's say named "col1". select table_name from information_schema.columns where column_name = 'col1'

Re: [GENERAL] pl/pgsql function debugging

2005-09-29 Thread A. Kretschmer
am 29.09.2005, um 20:08:17 +0200 mailte Craig folgendes: > Hi > > What is the best tool for debugging pl/pgsql functions? > Any suggestions would be appreciated RAISE NOTICE 'foo %', bar; Read: http://www.postgresql.org/docs/8.0/static/plpgsql-structure.html Regards, Andreas -- Andreas Kretsc

Re: [GENERAL] Perl regular expressions

2005-09-29 Thread A. Kretschmer
am 29.09.2005, um 9:14:39 -0400 mailte Sean Davis folgendes: > On 9/28/05 6:25 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > Is there any support for perl regular expressions > > in Postgresql? > > You might want to look at this section of the documentation: > > http://www.postgresq

Re: [GENERAL] Perl regular expressions

2005-09-29 Thread A. Kretschmer
am 28.09.2005, um 22:25:29 - mailte [EMAIL PROTECTED] folgendes: > Is there any support for perl regular expressions > in Postgresql? Yes, you can use perl regex in plperl. http://www.postgresql.org/docs/current/static/plperl.html Regards, Andreas -- Andreas Kretschmer(Kontakt: siehe H

Re: [GENERAL] Hardware requirements

2005-09-29 Thread A. Kretschmer
am 29.09.2005, um 9:20:00 +0200 mailte Rafael Montoya folgendes: > Ok, there are about 15 concurrent clients inserting and updating data, and > 20 concurrent clients only consulting. > I dont need all data in ram, of course, hehe, but i really have no idea > what's the minimum of ram for havin

Re: [GENERAL] Migration from MS SQL 2K

2005-09-28 Thread A. Kretschmer
am 28.09.2005, um 22:48:06 -0700 mailte TheNice Spider folgendes: > Hi, > > Currently I have serious problem to migrate a "production" MS SQL 2K to > Postgres 8 for Windows. > Is there any tools to import MS SQL 2K to Postgres 8 including: > - PK and FK > - View, Trigger, Store Procedure > - U

Re: [GENERAL] date_trunc('week', '2005-01-01'::TIMESTAMP)

2005-09-22 Thread A. Kretschmer
am 22.09.2005, um 12:40:00 +0300 mailte [EMAIL PROTECTED] folgendes: > > select date_trunc('week', '2005-01-01'::TIMESTAMP) returns '2006-01-02 > 00:00:00' Which version? test=# select date_trunc('week', '2005-01-01'::TIMESTAMP); date_trunc - 2004-12-27 00:00:00 (1 ro

Re: [GENERAL] pgclient hostbased authentication

2005-09-21 Thread A. Kretschmer
am 21.09.2005, um 15:53:45 +0200 mailte Bohdan Linda folgendes: > Hello, > > may I ask, how(or which) ip is checked against pg_hba.conf IP entry in NAT > environment? > > Could it be, that psql client packs IP address of the client into > athentication data? No. Why? Describe your problem. p

Re: [GENERAL] help needed for functions

2005-09-16 Thread A. Kretschmer
am 16.09.2005, um 6:51:16 -0700 mailte Nitin Ahire folgendes: > I am facing problems for stored procedures. Is their any way so that I > can transfer my existing stored procedure from mssql to postgre ? I guess: no. > > I already read about functions & tried to implement it but I could not >

Re: [GENERAL] help me learn

2005-09-12 Thread A. Kretschmer
am 12.09.2005, um 17:08:31 +0530 mailte suresh ramasamy folgendes: > hi, > > i'm new to postgreSQL as well as new to database concepts. please tell me > how can i learn. i mean the easiest and fast way. Your help will be Read a book. http://techdocs.postgresql.org/techdocs/bookreviews.php Re

Re: [GENERAL] table size performace

2005-09-07 Thread A. Kretschmer
am 07.09.2005, um 1:01:11 -0700 mailte Matthew Peter folgendes: > How many rows does it take for select performance on a > table to degrade? I hope this question isn't to > ambiguous (ie lollipop licks). But seriously, 100,000? > 1,000,000? 10,000,000? With just a regular lookup on > an unique in

Re: [GENERAL] Installation problem

2005-09-06 Thread A. Kretschmer
am 06.09.2005, um 20:13:57 +1000 mailte Peter Cook folgendes: > My installation has stalled with the following message: > "User 'postgres' could not be created. The user account already exists!" Which OS? Maybe it is useful to delete this account first. Regards, Andreas -- Andreas Kretschmer

Re: [GENERAL] PLPGSQL function schema or table parameter

2005-09-05 Thread A. Kretschmer
am 05.09.2005, um 14:26:31 -0300 mailte Sidnei de Souza folgendes: > Is it possible to pass a table name and/or schema name to a plpgsql > function? Yes. > How can I use them in the code? Which Types to use for each of the > parameters? varchar. > > E.g. > > create or replace function MyTe

Re: [GENERAL] remote connection, web hosting, IP adress

2005-09-05 Thread A. Kretschmer
am 05.09.2005, um 15:49:23 +0200 mailte Zlatko Mati? folgendes: > How can I connect to remote server from a remote personal computer > without its own IP adress ? You can connect to the remote server via ssh. Then you are a local user. SSH is a highly secure protocol, i suggest, use ssh with Publ

Re: [GENERAL] drop table before create

2005-08-27 Thread A. Kretschmer
am 26.08.2005, um 2:11:30 +0430 mailte Lee Harr folgendes: > >I have not been able to work out how to do this is Postgres 8 > >(pseudo-code) > > if exists table foo > > drop table foo; > > end > > create table foo; > >If I go with > > drop table foo; > > create table foo; > >then it barfs on

Re: [GENERAL] Import File

2005-08-23 Thread A. Kretschmer
am 23.08.2005, um 11:47:57 -0300 mailte Rodrigo Africani folgendes: > Hi, > > I'm trying to import a sequence txt file. > The file has fix columns ... i.e the first 10 positions is the primary key ... > The comand copy need a delimitier but the file is seq without a delimitier. > I look in the ma

Re: [GENERAL] How to limit database size

2005-08-23 Thread A. Kretschmer
am 23.08.2005, um 15:12:54 +0530 mailte Vishnu folgendes: > Hi, > > How can I limit the maximum space uses by Posgres database ??. So that it > should not use total disk space available on system. You can use the tools from the os, under Linux for instance quotas. You can also put the data dir

Re: [GENERAL] Query results caching?

2005-08-22 Thread A. Kretschmer
am 22.08.2005, um 22:13:49 +0200 mailte Ben-Nes Yonatan folgendes: > I think that I was misunderstood, Ill make an example: Okay: > Lets say that im making the following query for the first time on the > "motorcycles" table which got an index on the "manufacturer" field: > > EXPLAIN ANALYZE SE

Re: [GENERAL]

2005-08-22 Thread A. Kretschmer
am 22.08.2005, um 14:56:09 +0100 mailte Nigel Horne folgendes: > > > How does that help with my problem? I seems to discuss returning more > > > than one row of a table which is not the question I asked. > > > > > > > try to tell your questions more precisely :-) > > I want to return more than

Re: [GENERAL] SQL error - please help.

2005-08-22 Thread A. Kretschmer
am 23.08.2005, um 0:24:53 +1200 mailte Bernard folgendes: > SELECT > DEPARTMENT.PK, > DEPARTMENT.NAME, > MIN(PROJECT.VALUE)AS RATING > FROM DEPARTMENT, > PROJECT > WHERE DEPARTMENT.PK=PROJECT.DEPARTMENT_FK > GROUP BY DEPARTMENT.PK > ORDER BY DEPARTMENT.PK; > > ERROR: column "department.na

Re: [GENERAL] Postgresql Function Language question

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 11:34:52 -0500 mailte Tony Caduto folgendes: > Is it possible to write c style functions with Free Pascal? Please, if you open a new subject, then open also a new thread in this email-list. Your messages are always in a wrong thread. Regards, Andreas -- Andreas Kretschmer

Re: [GENERAL]

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 16:38:20 +0100 mailte Nigel Horne folgendes: > On Fri, 2005-08-19 at 16:30, Adam Witney wrote: > > > I can't work out from that how to return more than one value. > > > > Hi Nigel, > > > > Add SETOF to your function like so: > > > > CREATE TABLE test (id int); > > INSERT INTO

Re: [GENERAL] http://www.postgresql.org/docs/8.0/static/xfunc-sql.html

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 15:58:20 +0100 mailte Nigel Horne folgendes: > I can't work out from that how to return more than one value. 17:35 < rtfm_please> For information about srf 17:35 < rtfm_please> see http://techdocs.postgresql.org/guides/SetReturningFunctions 17:35 < rtfm_please> or http://www.p

Re: [GENERAL] Stored functions

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 12:07:57 +0100 mailte Nigel Horne folgendes: > The on-line manual, > http://www.postgresql.org/docs/8.0/interactive/index.html, > doesn't describe how to call stored functions, or if it does > it's well hidden. test=# create function get_foobar () returns varchar as $$begin retu

Re: [GENERAL] Input timestamp from epoch?

2005-08-19 Thread A. Kretschmer
am 19.08.2005, um 0:27:40 -0700 mailte Bill Moseley folgendes: > I'm entering data into a Postgresql database where the input dates are > currently in unix epoch values. Is there a way for Postgresql to > parse that epoch into a "timestamp(0) with time zone"? SELECT TIMESTAMP WITH TIME ZONE 'ep

Re: [GENERAL] Timing out connections?

2005-08-18 Thread A. Kretschmer
am 18.08.2005, um 12:36:26 -0500 mailte Peter Fein folgendes: > Hi- > > Is there any way to have the *server* timeout disconnected clients? I'm > connecting over a sometimes flaky WiFi connection & when it goes down, > I'm left with several open idle sessions. Is there a way to have the > serve

Re: [GENERAL] postgres 8.x on debian

2005-08-17 Thread A. Kretschmer
am 17.08.2005, um 15:12:55 -0300 mailte marcelo Cortez folgendes: > Hello all, > > does anyone know, whether there is a > Debian Package for postgresql 8.x for stable version? > Thanks in advance. I'm useing 8.0.3 from testing in Debian/Stable without problems. Regards, Andreas -- Andreas Kre

Re: [despammed] [GENERAL] Generating random values.

2005-08-17 Thread A. Kretschmer
am 17.08.2005, um 13:48:38 -0300 mailte Fernando Lujan folgendes: > Hi folks, > > I have a table wich contains my users... I want to insert to each user > a random password, so I need a random function. Is there such function > in Postgres? I just found the RANDOM which generates values between >

<    3   4   5   6   7   8