Re: [GENERAL] Problem with oids for table names getting out of sync?

2007-04-05 Thread Tom Lane
Omar Eljumaily [EMAIL PROTECTED] writes: I've run into this sort of obscure problem. I'm using libpq with a front end database api where I need to track column names and how they're returned in libpq queries. What's happening is that I start out with a set of table names when I open my

Re: [GENERAL] Adding multiple column in alter statement?

2007-04-05 Thread A. Kretschmer
am Thu, dem 05.04.2007, um 6:58:01 +0100 mailte Ashish Karalkar folgendes: Hello All, I want to add multiple column to a table using single alter statemet, someting like this: alter table admin_session add column accounting_session varchar(1) not null default '0',accounting_active

[GENERAL] Adding multiple column in alter statement?

2007-04-05 Thread Ashish Karalkar
Hello All, I want to add multiple column to a table using single alter statemet, someting like this: alter table admin_session add column accounting_session varchar(1) not null default '0',accounting_active varchar(1),acc_start_date date,acc_end_date date; is there any way?

Re: [GENERAL] Granting permissions

2007-04-05 Thread Ashish Karalkar
Even More is there any way to grant permission to a user on another database ?? With Regards Ashish A. Kretschmer [EMAIL PROTECTED] wrote: am Wed, dem 04.04.2007, um 22:23:20 -0700 mailte Postgres User folgendes: Is there a way to grant INSERT and UPDATE permissions on all the tables

Re: [GENERAL] Granting permissions

2007-04-05 Thread Ashish Karalkar
Even More is there any way to grant permission to a user on another database ?? With Regards Ashish A. Kretschmer [EMAIL PROTECTED] wrote: am Wed, dem 04.04.2007, um 22:23:20 -0700 mailte Postgres User folgendes: Is there a way to grant INSERT and UPDATE permissions on all the tables

Re: [GENERAL] All objects of a Particular USER

2007-04-05 Thread Zongliang, Quan
See here: http://www.postgresql.org/docs/8.2/static/catalog-pg-depend.html Regards. On Thu, 5 Apr 2007 07:41:06 +0100 (BST) Ashish Karalkar [EMAIL PROTECTED] wrote: Hello , All I want to see all the dependant object of a particular user, I know this must be present somewhere in

Re: [GENERAL] Granting permissions

2007-04-05 Thread A. Kretschmer
am Thu, dem 05.04.2007, um 7:59:11 +0100 mailte Ashish Karalkar folgendes: Even More is there any way to grant permission to a user on another database ?? What do you want to do? Andreas -- Andreas Kretschmer Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: - Header) GnuPG-ID:

[GENERAL] All objects of a Particular USER

2007-04-05 Thread Ashish Karalkar
Hello , All I want to see all the dependant object of a particular user, I know this must be present somewhere in information schema,catlog schema but realy cant figure out. can any one suggest? Thanks in advance Ashish

[GENERAL] Migrating data from mssql to postgresql

2007-04-05 Thread M. Nejat AYDIN
How can I migrate data from mssql to postgresql? I have researched in the mailing list archives and found some information. Some of them is related to migration wizard tool, which is, I believe, a plugin running on the pgadmin. But the current version of pgadmin does not contain it (or I could

Re: [GENERAL] Granting permissions

2007-04-05 Thread Ashish Karalkar
Hi, I want to give only select,insert,update,delete permission on a particular database to a user. and aslso this user should not have any createdb permission. With Regards Ashish... A. Kretschmer [EMAIL PROTECTED] wrote: am Thu, dem 05.04.2007, um 7:59:11 +0100 mailte Ashish Karalkar

Re: [GENERAL] Migrating data from mssql to postgresql

2007-04-05 Thread Shoaib Mir
You can use the MSSQL DTS wizard for that purpose and using PostgreSQL ODBC connector for target database connectivity there. -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 4/5/07, M. Nejat AYDIN [EMAIL PROTECTED] wrote: How can I migrate data from mssql to postgresql? I have

Re: [GENERAL] Migrating data from mssql to postgresql

2007-04-05 Thread Zongliang, Quan
Try these: http://pgfoundry.org/projects/my2postgres/ http://pgfoundry.org/projects/mysql2pgsql/ Regards. On Thu, 05 Apr 2007 11:00:58 +0300 M. Nejat AYDIN [EMAIL PROTECTED] wrote: How can I migrate data from mssql to postgresql? I have researched in the mailing list archives and found

Re: [GENERAL] Granting permissions

2007-04-05 Thread Ashish Karalkar
Hi, I want to give only select,insert,update,delete permission on a particular database to a user. and aslso this user should not have any createdb permission. With Regards Ashish... A. Kretschmer [EMAIL PROTECTED] wrote: am Thu, dem 05.04.2007, um 7:59:11 +0100 mailte Ashish Karalkar

[GENERAL] Trigger on CREATE ROLE

2007-04-05 Thread Inoqulath
Hello List Any chance to add a trigger-like behaviour on CREATE/DROP/ALTER ROLE? PostgreSQL 8.1.5 Thx in Advance ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Granting permissions

2007-04-05 Thread Ashish Karalkar
Even More is there any way to grant permission to a user on another database ?? With Regards Ashish A. Kretschmer [EMAIL PROTECTED] wrote: am Wed, dem 04.04.2007, um 22:23:20 -0700 mailte Postgres User folgendes: Is there a way to grant INSERT and UPDATE permissions on all the tables

[GENERAL] Cron'd dumpall failing?

2007-04-05 Thread Kenneth Downs
I truly hoping I'm missing something silly here. I've got a cron job to run a dumpall each early am. It fails, and I get a handful of emails. The first reads like this: pg_dump: [archiver (db)] connection to database adocs failed: FATAL: sorry, too many clients already pg_dumpall: pg_dump

Re: [GENERAL] All objects of a Particular USER

2007-04-05 Thread Alvaro Herrera
Zongliang, Quan escribió: See here: http://www.postgresql.org/docs/8.2/static/catalog-pg-depend.html pg_shdepend is more appropriate in this case. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.

Re: [GENERAL] Granting permissions

2007-04-05 Thread Albe Laurenz
I want to give only select,insert,update,delete permission on a particular database to a user. and aslso this user should not have any createdb permission. I think that you get the concept wrong. You cannot select from a database, you can only select from a table (or view). You probably

Re: [GENERAL] Granting permissions

2007-04-05 Thread Ashish Karalkar
Thanks Albe , yes,database means all objects of that database. I will check this out. Thanks Ashish... Albe Laurenz [EMAIL PROTECTED] wrote: I want to give only select,insert,update,delete permission on a particular database to a user. and aslso this user should not have any

[GENERAL] inet_client_addr() implementation

2007-04-05 Thread J. ORIOL
Hello, I was in the archives, looking for some concrete info about inet_client_addr() use, but only a C function found. I have some clients to my app. (PG 8.2 in XP LAN). I want to generate auto-logs with trigger function for every table and for every event, but I cannot include clint ip

Re: [GENERAL] inet_client_addr() implementation

2007-04-05 Thread Magnus Hagander
On Thu, Apr 05, 2007 at 07:57:41AM -0500, J. ORIOL wrote: Hello, I was in the archives, looking for some concrete info about inet_client_addr() use, but only a C function found. I have some clients to my app. (PG 8.2 in XP LAN). I want to generate auto-logs with trigger function for

[GENERAL] Print database name

2007-04-05 Thread Woody Woodring
Is there a sql command to print out which database I am connected to? I am using psql -f sqlFile in a sh script to up date tables on multiple databases. I would like to have the sqlFile display the db name so I would know which output lines go with each db without having to count the output

Re: [GENERAL] Print database name

2007-04-05 Thread Michael Fuhr
On Thu, Apr 05, 2007 at 08:51:28AM -0400, Woody Woodring wrote: Is there a sql command to print out which database I am connected to? SELECT current_database(); See System Information Functions in the documentation for other such functions.

Re: [GENERAL] Using C# to create stored procedures

2007-04-05 Thread Tomi N/A
2007/4/3, Andrus [EMAIL PROTECTED]: I needd to re-write a lot of compliatated SQL select statements to run them in server which generate reports. Currently they are running in client side. Client application uses procedural language to do additional processing of data retrieved from PostgreSQL

Re: [GENERAL] Problem with oids for table names getting out of sync?

2007-04-05 Thread omar
SELECT relfilenode, relname FROM pg_class WHERE relname !~ '^(pg_|sql_)' AND relkind = 'r' Oid o = PQftable(_res, i); Um ... are you laboring under some delusion about relfilenode being the same as relation OID? Apparently I am. libpq docs claim that You can query

Re: [GENERAL] Print database name

2007-04-05 Thread Jaime Silvela
I know you've probably discussed this in many places, but I have a crash right now I need to recover from, and I'm not finding documentation that fast. Where should I go? Below you can see the log on starting, after a kill -9 of a process brought Postgres down. After letting postgres run for

Re: [GENERAL] Using C# to create stored procedures

2007-04-05 Thread Scott Ribe
Awhile back I read an article claiming that .NET could only host one language, or at least only languages that differed merely in trivial syntactic details --- its execution engine isn't flexible enough for anything truly interesting. Haven't looked into that for myself though ... any

Re: [GENERAL] Problem with oids for table names getting out of sync?

2007-04-05 Thread Alvaro Herrera
omar wrote: SELECT relfilenode, relname FROM pg_class WHERE relname !~ '^(pg_|sql_)' AND relkind = 'r' Oid o = PQftable(_res, i); Um ... are you laboring under some delusion about relfilenode being the same as relation OID? Apparently I am. libpq docs claim

[GENERAL] Crash recovery

2007-04-05 Thread Jaime Silvela
Apologies for the duplication - I've been having email problems. Jaime Silvela wrote: I know you've probably discussed this in many places, but I have a crash right now I need to recover from, and I'm not finding documentation that fast. Where should I go? Below you can see the log on

Re: [GENERAL] Cron'd dumpall failing?

2007-04-05 Thread Tom Lane
Kenneth Downs [EMAIL PROTECTED] writes: pg_dump: [archiver (db)] connection to database adocs failed: FATAL: sorry, too many clients already you need to increase max_connections and/or superuser_reserved_connections pg_dump: Error message from server: ERROR: out of shared memory HINT:

Re: [GENERAL] Problem with oids for table names getting out of sync?

2007-04-05 Thread Omar Eljumaily
Alvaro and Tom, thanks so much. I was getting worried that I was going to have to ask my customers to dump and restore periodically, ugh. I think I need to learn a bit more about postgresql internals to help me with my project. Not thinking about selecting for oids is kind of embarrassing.

Re: [GENERAL] Print database name

2007-04-05 Thread Tom Lane
Jaime Silvela [EMAIL PROTECTED] writes: Below you can see the log on starting, after a kill -9 of a process brought Postgres down. After letting postgres run for a while, it seems to have fixed itself, and now the log does not suggest any corruption, and I can access it locally. However,

Re: [GENERAL] OS X Kernel settings

2007-04-05 Thread Scott Ribe
I'm not sure whether Apple has fixed the bug in the startup script, where the external file was referred AFTER the values where set. Yes. You can now edit /etc/sysctl.conf and nothing else is required. I learned this ~10.4.8, so I don't know when it actually happened. -- Scott Ribe [EMAIL

Re: [GENERAL] Print database name

2007-04-05 Thread Jaime Silvela
1. Sorry, that was an accident. I sent a new thread to the list and it didn't make it. Thinking I had gotten the address wrong, I replied to this thread and accidentally hit send, forgetting to change the subject. My apologies, no hijacking was intended. 2. Close. The database was generally

Re: [GENERAL] inet_client_addr() implementation

2007-04-05 Thread J. ORIOL
Thanks Magnus, I have working my triggers, just with 127.0.0.1, soon I'll make tests with LAN clients. Best regards. Magnus Hagander [EMAIL PROTECTED] escribió: On Thu, Apr 05, 2007 at 07:57:41AM -0500, J. ORIOL wrote: Hello, I was in the archives, looking for some concrete info about

Re: [GENERAL] OS X Kernel settings

2007-04-05 Thread Guido Neitzer
On 05.04.2007, at 09:09, Scott Ribe wrote: Yes. You can now edit /etc/sysctl.conf and nothing else is required. I learned this ~10.4.8, so I don't know when it actually happened. Okay, that's good. They had the wrong order of commands before, so that the values in /etc/rc were used and not

Re: [GENERAL] Storing blobs in PG DB

2007-04-05 Thread Naz Gassiep
This doesn't answer your question, but I thought I'd throw my opinion in anyway. My personal view is that in general, binary files have no place in databases. Filesystems are for files, databases are for data. My design choice is to store the files in a fileystem and use the database to hold

Re: [GENERAL] Using C# to create stored procedures

2007-04-05 Thread Postgres User
Andrus, As a C# developer myself, I'd recommend learning pl/pg sql for writring stored procs. It's designed specifically for the kinds of iterations and other operations you need when hanlding a recordset. It's nothing like transact-sql of SQL Server. If you must have full C# integration, then

Re: [GENERAL] Anyone know where I can get an 8.2.3 binary for ubuntu?

2007-04-05 Thread Michelle Konzack
Am 2007-04-01 12:05:44, schrieb Leonel: and once you downloaded the packages do a : apt-get build-deps postgresql-8.1 Are you sure? -- It should be: apt-get build-deps postgresql-8.2 then dpkg-source -x postgresql-8.2_8.2.3-2.dsc cd postgresql-8.2-8.2.3 cd postgresql-8.2

Re: [GENERAL] Tsearch2 crashes my backend, ouch !

2007-04-05 Thread Michelle Konzack
Hello Teodor, Am 2007-03-30 16:49:19, schrieb Teodor Sigaev: Our tsearch_core patch (moving tsearch into core of pgsql) solves that problem - it contains all possible snowball stemmers. I have problems migrating my 7.4 to 8.2 since Debian contain only 8.1. Applaying tsearch2 is strange too.

[GENERAL] Seg fault in pg_dump?

2007-04-05 Thread Michael Nolan
I get a segmentation fault in pg_dump (8.2.3 on a Linux Fedora Core 5 system) when dumping some (but not all) of the sequences in the public schema:. Here's the output from /usr/local/pgsql/bin/pg_dump -v -t uscf_dues_dues_key_seq -U postgres uscf uscf_dues_dues_key_seq.seq pg_dump: reading

[GENERAL] turn off cache option

2007-04-05 Thread jungmin shin
Hello, I'm executing a query invoking a UDF. It looks that Postgres use a cache for executing UDFs. For example, select a() a is a UDF. Excution time of above statement is different each time. What is happening inside of the Postgres when I invoke a UDF in a query? It is taking 200ms or

Re: [GENERAL] Seg fault in pg_dump?

2007-04-05 Thread Alvaro Herrera
Michael Nolan escribió: /usr/local/pgsql/bin/pg_dump -v -t uscf_dues_dues_key_seq -U postgres uscf uscf_dues_dues_key_seq.seq Any ideas what to try? Here's one: get a backtrace from GDB. Here, I get this error: $ LC_ALL=C pg_dump -v -t uscf_dues_dues_key_seq -U alvherre uscf pg_dump: No

Re: [GENERAL] Storing blobs in PG DB

2007-04-05 Thread Listmail
My personal view is that in general, binary files have no place in databases. Filesystems are for files, databases are for data. My design choice is to store the files in a fileystem and use the database to hold metadata as well as a pointer to the file. If you *must* put files into the

Re: [GENERAL] Seg fault in pg_dump?

2007-04-05 Thread Michael Nolan
GDB produces: Program received signal SIGSEGV, Segmentation fault. 0x0804fd6f in dumpSequence () The sequence definitely exists and works: select * from uscf_dues_dues_key_seq ; sequence_name | last_value | increment_by | max_value | min_ value | cache_value | log_cnt |

Re: [GENERAL] Print database name

2007-04-05 Thread Martijn van Oosterhout
On Thu, Apr 05, 2007 at 11:17:49AM -0400, Jaime Silvela wrote: 1. Sorry, that was an accident. I sent a new thread to the list and it didn't make it. Thinking I had gotten the address wrong, I replied to this thread and accidentally hit send, forgetting to change the subject. My apologies,

Re: [GENERAL] Storing blobs in PG DB

2007-04-05 Thread Merlin Moncure
On 4/5/07, Listmail [EMAIL PROTECTED] wrote: My personal view is that in general, binary files have no place in databases. Filesystems are for files, databases are for data. My design choice is to store the files in a fileystem and use the database to hold metadata as well as a pointer to

Re: [GENERAL] Storing blobs in PG DB

2007-04-05 Thread Thomas Kellerer
Merlin Moncure wrote on 05.04.2007 23:24: I think most reasons why not to store binaries in the database boil down to performance. Having implemented an application where the files were stored in the filesystem instead of the database I have to say, with my experience I would store the files

RES: [GENERAL] Order by behaviour

2007-04-05 Thread Carlos H. Reimer
Hi, I was trying to find the docs about the collating sequence standards but could not find. Would like to know for example which characters are ignored by the order by in some of the collating types. Please, can anyone indicate me where could I find documentation about these standards? Thanks

Re: [GENERAL] Seg fault in pg_dump?

2007-04-05 Thread Alvaro Herrera
Michael Nolan escribió: GDB produces: Program received signal SIGSEGV, Segmentation fault. 0x0804fd6f in dumpSequence () Not very helpful -- what does it say if you ask for bt? I'm thinking this is not a debug-enabled build though. I think you have to install a separate RPM package in

Re: [GENERAL] Storing blobs in PG DB

2007-04-05 Thread William Garrison
I have actually never stored data in the database. But in a recent project I've realized it might have been smart. We store a terabytes of data on the file system, and many times I would love to have an ACID compliant file system. For example, if I delete an entry, I need to delete it from

[GENERAL] Sort and Limit - really nasty query and feature of the day

2007-04-05 Thread Listmail
Today I rewrote a particularly nasty query involving a UNION ALL between an active table and a huge archive table, some left joins, order by and limit, and it went from 5 minutes to under one second ; however one query became 4 with some glue in between. EXPLAIN SELECT * FROM ( SELECT 0

Re: [GENERAL] Storing blobs in PG DB

2007-04-05 Thread Thomas Kellerer
William Garrison wrote on 06.04.2007 00:22: I have actually never stored data in the database. Hmm, funny statement somehow ;) ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Migrate postgres DB to oracle

2007-04-05 Thread bcochofel
I need some help to migrate a postgres DB (v7.4) to oracle. His there any tools, SW, scripts or something to help me with the job? Thanks, Bruno ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

Re: [GENERAL] Anyone know where I can get an 8.2.3 binary for ubuntu?

2007-04-05 Thread Leonel
On 4/5/07, Michelle Konzack [EMAIL PROTECTED] wrote: Am 2007-04-01 12:05:44, schrieb Leonel: and once you downloaded the packages do a : apt-get build-deps postgresql-8.1 Are you sure? -- It should be: You don't have the build-dep for 8.2 in ubuntu dapper/ edgy apt-get

Re: [GENERAL] Migrate postgres DB to oracle

2007-04-05 Thread mmara
- Mensaje original - De: bcochofel [EMAIL PROTECTED] Fecha: Jueves, Abril 5, 2007 7:46 pm Asunto: [GENERAL] Migrate postgres DB to oracle I need some help to migrate a postgres DB (v7.4) to oracle. His there any tools, SW, scripts or something to help me with the job? Thanks, Bruno

Re: [GENERAL] Anyone know where I can get an 8.2.3 binary for ubuntu?

2007-04-05 Thread Listmail
On 4/5/07, Michelle Konzack [EMAIL PROTECTED] wrote: Am 2007-04-01 12:05:44, schrieb Leonel: and once you downloaded the packages do a : apt-get build-deps postgresql-8.1 Are you sure? -- It should be: You don't have the build-dep for 8.2 in ubuntu dapper/ edgy I recently

Re: [GENERAL] turn off cache option

2007-04-05 Thread Ragnar
On fim, 2007-04-05 at 16:31 -0400, jungmin shin wrote: I'm executing a query invoking a UDF. It looks that Postgres use a cache for executing UDFs. Postgresql is not using a cache specially for executing UDFs, apart from only compiling the function once for each session. select a()

Re: [GENERAL] Storing blobs in PG DB

2007-04-05 Thread William Garrison
lol. yeah, I meant binary blobs. :-) Thomas Kellerer wrote: William Garrison wrote on 06.04.2007 00:22: I have actually never stored data in the database. Hmm, funny statement somehow ;) ---(end of broadcast)--- TIP 5: don't forget to

Re: [GENERAL] ERROR: out of shared memory

2007-04-05 Thread Joseph S
Try doing select * from pg_locks to see how many locks you have out. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] problem selecting from function

2007-04-05 Thread Rikard Pavelic
Hi! Can someone help me with this problem. When I select from this function I get an error ERROR: record red has no field id SQL state: 42703 Context: PL/pgSQL function select_ex1 line 4 at assignment Here is the code create table example1( id serial primary key, name1 varchar(10), value1

Re: [GENERAL] Migrating data from mssql to postgresql

2007-04-05 Thread David Fetter
On Thu, Apr 05, 2007 at 11:00:58AM +0300, M. Nejat AYDIN wrote: How can I migrate data from mssql to postgresql? I have researched in the mailing list archives and found some information. Some of them is related to migration wizard tool, which is, I believe, a plugin running on the pgadmin.

Re: [GENERAL] Migrate postgres DB to oracle

2007-04-05 Thread Vladimir Zelinski
You can try metalink (https://metalink.oracle.com/), but they want $$$ for forum like this one. --- [EMAIL PROTECTED] wrote: - Mensaje original - De: bcochofel [EMAIL PROTECTED] Fecha: Jueves, Abril 5, 2007 7:46 pm Asunto: [GENERAL] Migrate postgres DB to oracle I need some help