[SQL] column definition list of a dynamic record argument

2007-02-28 Thread Sabin Coanda
Hi, I'd like to build a function which have a RECORD type input argument, and to find in the function body its associated column definition list. Is it posible ? TIA, Sabin ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL pr

[SQL] How to store a password encripted in a user defined table

2007-02-28 Thread Eugenio Flores
Hello, I wonder if somebody knows how to store passwords in a column that is part of a user defined table. I've been searching and reading the documentation, but I can't find what I'm looking for. I just get password subjects related to client's connections to the database. Thanks in advance

Re: [SQL] How to union table without union statement?

2007-02-28 Thread calendarw
Hi, I am using the following query now, but the time is too slow. could anyone can help me? CREATE OR REPLACE VIEW alllogview AS ((( SELECT alarmdtl.tagname, a_alarmtbl.occurtime, a_alarmtbl.restoretime, a_alarmtbl.ack, alarmdtl.alarmtype, alarmdtl.alarmmsg1, alarmdtl.alarmmsg2, alarmdtl.al

Re: [SQL] [GENERAL] Esay question, about the numeric format

2007-02-28 Thread Bruno Wolff III
On Thu, Feb 22, 2007 at 12:20:12 +0100, Rafa Comino <[EMAIL PROTECTED]> wrote: > Hi every body > I have this query > SELECT 20.00::numeric(38,2) > and postgre gives me 20, i need that postgre gives me 20.00 > What can i do? i suppose this must be easy, but i dont find how to do ir > thanks every

[SQL] what is the best way to get key information in postgres?

2007-02-28 Thread Noura Elhawary
Hi, I want to know what is the best way to get all the keys(unique, primary, foreign, multiple) for a table in postgres, I actually found this query and i am not sure if it is the best way to get the keys info: select r.relname as "Table", c.conname as "Constraint Name", contype as "Constraint Ty

[SQL] pg_dump inquiry

2007-02-28 Thread Karthikeyan Sundaram
Hi, I have to dump only 10 tables out of 100 tables. In the pg_dump utility given by postgres there is an option called -t followed by table name. In that option, if I give more than 1 table, it's not accepting. How can I get the dump in one stroke for all the 10 tables? Please advi

[SQL] unsubscribe

2007-02-28 Thread Franz Stuetzle
---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [SQL] [ADMIN] pg_dump error

2007-02-28 Thread Karthikeyan Sundaram
Hi Joshua, Thanks for your reply. No, I recently installed (fresh installation) from scratch. Regards skarthi From: "Joshua D. Drake" <[EMAIL PROTECTED]> To: Karthikeyan Sundaram <[EMAIL PROTECTED]> CC: pgsql-admin@postgresql.org, pgsql-sql@postgresql.org Subject: Re: [ADMIN] pg_dump er

[SQL] pg_dump error

2007-02-28 Thread Karthikeyan Sundaram
Hi, I am using 8.2.1 on my dev server. When I do a pg_dump, I am getting an error message. pg_dump -U postgres podcast -t channel pg_dump: symbol lookup error: pg_dump: undefined symbol: PQescapeStringConn How can I resolved this? What may be the problem? Because of this, I am no

Re: [SQL] system tables inquiry & db Link inquiry

2007-02-28 Thread Scott Marlowe
On Wed, 2007-02-28 at 12:19, Karthikeyan Sundaram wrote: > Hi, > > We are using Postgres 8.1.0 Stop. Do not pass go, do not collect $200. Update your postgresql installation now to 8.1.8. There were a lot of bugs fixed between 8.1.0 and 8.1.8. After that... > Question No 1: > ===

Re: [SQL] system tables inquiry & db Link inquir

2007-02-28 Thread Gary Chambers
I want to find all the sequences. What is the system tables that have the information about all the sequences? psql -E -U \ds Capture the query that psql sends to the server. Can't help with the dblink -- sorry. -- Gary Chambers // Nothing fancy and nothing Microsoft! ---

[SQL] system tables inquiry & db Link inquiry

2007-02-28 Thread Karthikeyan Sundaram
Hi, We are using Postgres 8.1.0 Question No 1: = There are lots of system tables that are available in postgres. For example pg_tables will have all the information about the tables that are present in a given schema. pg_views will have all the information about the views for

Re: [SQL] Case with Char(1)

2007-02-28 Thread Ezequias Rodrigues da Rocha
Now it is working. Thank you for your interest. Ezequias 2007/2/28, Andrew Sullivan <[EMAIL PROTECTED]>: On Wed, Feb 28, 2007 at 10:02:38AM -0300, Ezequias Rodrigues da Rocha wrote: > Hi list, > > it is possible to use case with character (1) ? > > I am having problems to formate the SQL stateme

Re: [SQL] Case with Char(1)

2007-02-28 Thread Peter Eisentraut
Am Mittwoch, 28. Februar 2007 14:02 schrieb Ezequias Rodrigues da Rocha: > it is possible to use case with character (1) ? Have you tried it? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 7: You can help

Re: [SQL] Case with Char(1)

2007-02-28 Thread Andrew Sullivan
On Wed, Feb 28, 2007 at 10:02:38AM -0300, Ezequias Rodrigues da Rocha wrote: > Hi list, > > it is possible to use case with character (1) ? > > I am having problems to formate the SQL statement. Your example looked like it worked. A -- Andrew Sullivan | [EMAIL PROTECTED] Users never remark,

[SQL] Case with Char(1)

2007-02-28 Thread Ezequias Rodrigues da Rocha
Hi list, it is possible to use case with character (1) ? I am having problems to formate the SQL statement. I have: SELECT * FROM test; a --- A B C SELECT a, CASE WHEN a='A' THEN 'one' WHEN a='B' THEN 'two' ELSE 'other' END FROM test; a | case ---+-

Re: [SQL] Conditional NOT NULL constraint

2007-02-28 Thread Andreas Joseph Krogh
On Wednesday 28 February 2007, Richard Huxton wrote: > Andreas Joseph Krogh wrote: > > Hi all! > > Is there a simple way to add a "NOT NULL constraint" to a column without > > using a trigger if another column is not null? > > Something like this: > > > > CREATE TABLE activity( > > id SERIAL primar

Re: [SQL] Conditional NOT NULL constraint

2007-02-28 Thread Richard Huxton
Andreas Joseph Krogh wrote: Hi all! Is there a simple way to add a "NOT NULL constraint" to a column without using a trigger if another column is not null? Something like this: CREATE TABLE activity( id SERIAL primary key, name varchar not null, created timestamp not null default now(), modifi

Re: [SQL] How to union table without union statement?

2007-02-28 Thread Richard Huxton
calendarw wrote: Hi, I need to combine 10 tables which contain same table structure and join an "other table" to show the latest 200 record, I am join the "other table" first and using union statement to select all record now but the collection time is super slow, how can I improve the collectio

[SQL] Conditional NOT NULL constraint

2007-02-28 Thread Andreas Joseph Krogh
Hi all! Is there a simple way to add a "NOT NULL constraint" to a column without using a trigger if another column is not null? Something like this: CREATE TABLE activity( id SERIAL primary key, name varchar not null, created timestamp not null default now(), modified timestamp, created_by intege

[SQL] How to union table without union statement?

2007-02-28 Thread calendarw
Hi, I need to combine 10 tables which contain same table structure and join an "other table" to show the latest 200 record, I am join the "other table" first and using union statement to select all record now but the collection time is super slow, how can I improve the collection speed? Thanks.