[GENERAL] Keyword OWNED not recognized in pg v. 8.1

2007-02-13 Thread dfx
Thank you Tom, I tryied in any way to upgrade to 8.2 but I get only v. 8.1.8 (with yum). I tryied also with .rpm downloaded from postgres official site but I get a lot of unresolved dependencies. So I ask if it exist a document that explain step by step the process to upgrade v. 8.1 to v. 8.2

Re: [GENERAL] PostgreSQL and OpenLdap

2007-02-13 Thread Magnus Hagander
On Mon, Feb 12, 2007 at 09:41:44PM -0200, Cristiano Panvel wrote: Thanks Magnus, Now I am passing the line thus pg_hba.conf ## hostall all 10.193.4.0/24 ldap ldap://ldap.cb.sc.gov.br/dc=cb,dc=sc,dc=gov,dc=br ## However error in login is occurring

[GENERAL] How to append tables in a view

2007-02-13 Thread Ashish Karalkar
Hello List, I want to append column of two different tables in a single column of a view . data type of tow column of two diffrent tables will be same. WHAT I WANT TO DO IS: Table 1 ID DESC 1 A 2 B 3 C

Re: [GENERAL] Adjacency List or Nested Sets to model file system hierarchy?

2007-02-13 Thread Alban Hertroys
Bill Moseley wrote: On Mon, Feb 12, 2007 at 05:36:37PM +, Ian Harding wrote: You don't mention the ltree contrib module, have you looked at it? It can easily meet your requirements without having to reinvent anything. It may be what you're referring to as Nested Sets, I don't know. I

Re: [GENERAL] Testing embedded SQL in C

2007-02-13 Thread Shane Ambler
HT NB wrote: Hi, How are you doing? First, I am testing if this email address is valid. It is the first time that I am using this account. I have a question about how to start write embedded SQL in C programming code. What are the basic requirements in the .pgc file to have the embedded SQL

Re: [GENERAL] How to append tables in a view

2007-02-13 Thread Alban Hertroys
Ashish Karalkar wrote: Hello List, I want to append column of two different tables in a single column of a view . data type of tow column of two diffrent tables will be same. WHAT I WANT TO DO IS: Table 1 ID DESC 1 A 2 B 3 C

Re: [GENERAL] How to append tables in a view

2007-02-13 Thread Shane Ambler
Ashish Karalkar wrote: Hello List, I want to append column of two different tables in a single column of a view . data type of tow column of two diffrent tables will be same. WHAT I WANT TO DO IS: Table 1 ID DESC 1 A 2 B 3 C

Re: [GENERAL] How to append tables in a view

2007-02-13 Thread Shoaib Mir
I guess UNION ALL should work good here instead of a UNION for the exact same kind of output he needs: SELECT id,desc FROM table1 UNION ALL SELECT id,desc FROM table2; ---+--- 1 | A 2 | B 3 | C 1 | D 2 | E 3 | F As UNION gave me a little different output, like this: ---+-- 1 | A 1 | D 2 | B

Re: [GENERAL] How to append tables in a view

2007-02-13 Thread Shane Ambler
Shoaib Mir wrote: I guess UNION ALL should work good here instead of a UNION for the exact same kind of output he needs: That would be UNION ordering the results to remove duplicate rows which UNION ALL doesn't do. Technically the results from any query can come back in any order unless an

Re: [GENERAL] Adjacency List or Nested Sets to model file system hierarchy?

2007-02-13 Thread hubert depesz lubaczewski
On 2/12/07, Bill Moseley [EMAIL PROTECTED] wrote: Also, the Nested Sets seem to solve problems I don't have -- such as finding all descendants of a given node. you can also check different way. i described it here: http://www.depesz.com/various/various-sqltrees-implementation.php it is in

Re: [GENERAL] How to append tables in a view

2007-02-13 Thread Shoaib Mir
So hmm a UNION with an ORDERY BY should be good for this scenario... -- Shoaib Mir EnterpriseDB (www.enterprisedb.com) On 2/13/07, Shane Ambler [EMAIL PROTECTED] wrote: Shoaib Mir wrote: I guess UNION ALL should work good here instead of a UNION for the exact same kind of output he needs:

Re: [GENERAL] How to append tables in a view

2007-02-13 Thread Alban Hertroys
Shoaib Mir wrote: So hmm a UNION with an ORDERY BY should be good for this scenario... Only if the order matters to the OP, but he can always perform an ORDER BY on the queries on his view. I don't really see the point. The main difference between UNION and UINION ALL is that the latter allows

Re: [GENERAL] Dumb question - how to tell if autovacuum is doing its job in 8.2.x

2007-02-13 Thread Pavan Deolasee
On 2/13/07, Walter Vaughan [EMAIL PROTECTED] wrote: select last_autovacuum, last_autoanalyze from pg_stat_all_tables; last_autovacuum | last_autoanalyze -+-- | ...snip lots of identically blank lines... | |

[GENERAL] missing FROM-clause

2007-02-13 Thread MaRCeLO PeReiRA
Hi guys, I upgraded my PostgreSQL server (7.4 to 8.2) and now all my reports refuse to run because the warning missing FROM-clause. How can I disable it, just to run as the old version?? I have tried: # set add_missing_from to false but, without success!! :( The warning is still there!!

[GENERAL] missing FROM-clause (more)

2007-02-13 Thread MaRCeLO PeReiRA
Hi guys, (1) I change postgresql.conf: add_missing_from = off (2) pg_ctl stop (3) pg_ctl start Without success!! The warning is still there!! :( Any ideas Thanks in advance, Marcelo Pereira __ Fale com seus amigos de graça com o novo

Re: [GENERAL] daylight savings patches needed?

2007-02-13 Thread Jorge Godoy
Joseph Shraibman jks@selectacast.net writes: Robert Treat wrote: If you are running pre-8.0 versions you need to update your operating system (as you indicated). If you running an any 8.x version, you need to be on the most current corresponding 8.x.y release. So what happens if you have

Re: [GENERAL] missing FROM-clause (more)

2007-02-13 Thread A. Kretschmer
am Tue, dem 13.02.2007, um 9:46:26 -0300 mailte MaRCeLO PeReiRA folgendes: Hi guys, (1) I change postgresql.conf: add_missing_from = off (2) pg_ctl stop (3) pg_ctl start Without success!! The warning is still there!! :( Any ideas Change it to 'yes' ;-) And, of course,

[GENERAL] Function, that returns set of 2 tables columns

2007-02-13 Thread Dmitriy Chumack
Hi * I need to write a function, that returns a set of all columns from 2 tables. e.g. I create such a function: CREATE OR REPLACE FUNCTION func(val_ int8) RETURNS SETOF record AS $BODY$ DECLARE i record; BEGIN for i in select * from Table1, Table2

Re: [GENERAL] PostgreSQL and OpenLdap

2007-02-13 Thread Cristiano Panvel
I am not trying thus passed the usuary, and this users does not function is active and functioned in the OpenLdap. ldap ldap://ldap.cb.sc.gov.br/uid=scott,ou=Users,dc=cb,dc=sc,dc=gov,dc=br something is very strange Cris. On 2/13/07, Magnus Hagander [EMAIL PROTECTED] wrote: On Mon,

Re: [GENERAL] Function, that returns set of 2 tables columns

2007-02-13 Thread A. Kretschmer
am Tue, dem 13.02.2007, um 15:46:19 +0200 mailte Dmitriy Chumack folgendes: Hi * I need to write a function, that returns a set of all columns from 2 tables. e.g. I create such a function: CREATE OR REPLACE FUNCTION func(val_ int8) RETURNS SETOF record AS $BODY$

Re: [GENERAL] Function, that returns set of 2 tables columns

2007-02-13 Thread Willy-Bas Loos
You need to specify and cast explicitly from your calling statement: SELECT * FROM func1(10) AS (col1 smallint, col2 bigint, col3 date); On 2/13/07, Dmitriy Chumack [EMAIL PROTECTED] wrote: Hi * I need to write a function, that returns a set of all columns from 2 tables. e.g. I

Re: [GENERAL] Function, that returns set of 2 tables columns

2007-02-13 Thread Dmitriy Chumack
Tuesday, February 13, 2007, 3:55:36 PM, Andreas Kretschmer: am Tue, dem 13.02.2007, um 15:46:19 +0200 mailte Dmitriy Chumack folgendes: Hi * I need to write a function, that returns a set of all columns from 2 tables. e.g. I create such a function: CREATE OR REPLACE

Re: [GENERAL] Keyword OWNED not recognized in pg v. 8.1

2007-02-13 Thread Raymond O'Donnell
dfx wrote: I tryied also with .rpm downloaded from postgres official site but I get a lot of unresolved dependencies. So I ask if it exist a document that explain step by step the process to upgrade v. 8.1 to v. 8.2 under Fedora Core 6, a document for novices, as I am. For what it's worth,

Re: [GENERAL] Function, that returns set of 2 tables columns

2007-02-13 Thread A. Kretschmer
am Tue, dem 13.02.2007, um 16:09:16 +0200 mailte Dmitriy Chumack folgendes: Tuesday, February 13, 2007, 3:55:36 PM, Andreas Kretschmer: am Tue, dem 13.02.2007, um 15:46:19 +0200 mailte Dmitriy Chumack folgendes: Hi * I need to write a function, that returns a set of all columns

Re: [GENERAL] Function, that returns set of 2 tables columns

2007-02-13 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/13/07 07:46, Dmitriy Chumack wrote: Hi * I need to write a function, that returns a set of all columns from 2 tables. [snip] for i in select * from Table1, Table2 loop return next i; end loop; [snip] This two

[GENERAL] Possible outer join bug with coalesce in 8.2

2007-02-13 Thread John McCawley
My development machine is PostgreSQL 8.1.5, and my production machine is PostgreSQL 8.2. Until now I haven't run into any differences in behavior. I have a query with a relatively wacky join, and while it was working on my development machine, it wouldn't work on the production machine. The

Re: [GENERAL] PostgreSQL and OpenLdap

2007-02-13 Thread Magnus Hagander
Fisrt, you still have not shown us the output in the server log. That is still where you will see more information about why it's failing. Second, if that's what you want, you should probably try: ldap://ldap.cb.sc.gov.br/dc=cb,dc=sc,dc=gov,dc=br;uid=;ou=users, Or something along that line.

Re: [GENERAL] Keyword OWNED not recognized in pg v. 8.1

2007-02-13 Thread Peter Eisentraut
Raymond O'Donnell wrote: For what it's worth, I've always found it easier to compile from source than to try and grapple with packet managers, both under RedHat and Ubuntu, and I'm no Linux expert on Ubuntu in particular, apt-get seems to scatter files around the hard disk in all sorts of

Re: [GENERAL] Function, that returns set of 2 tables columns

2007-02-13 Thread Willy-Bas Loos
Creating a view might work. Yeah, if all you use is SELECT, you should probably use a view, then you don't need to specify the output columns in the calling statement, only a WHERE clause. Othrewise, it's the same thing: SELECT * FROM myview WHERE field1=10; Views are transparant in postgresql,

Re: [GENERAL] PostgreSQL and OpenLdap

2007-02-13 Thread Cristiano Panvel
It does not appear nothing in log, only in /var/log/message the error of failed in login. Feb 13 12:04:16 fns4 postgres[7055]: [4-1] FATAL: LDAP authentication failed for user scott Feb 13 12:04:20 fns4 postgres[7056]: [4-1] FATAL: LDAP authentication failed for user scott Feb 13 12:04:20 fns4

Re: [GENERAL] Possible outer join bug with coalesce in 8.2

2007-02-13 Thread Tom Lane
John McCawley [EMAIL PROTECTED] writes: What exactly is going on here? EXPLAIN might shed some light. However, if you think this is a bug then you need to provide a self-contained test case. regards, tom lane ---(end of

[GENERAL] A view needs at least one column whereas a table doesn't...

2007-02-13 Thread Gurjeet Singh
The first SQL command throws an error whereas the second one runs fine: edb=# create schema s1 authorization u1 edb-# create table t1() create view v1 as select * from t1; ERROR: view must have at least one column edb=# edb=# create schema s1 authorization u1 edb-# create table t1( c1 int )

Re: [GENERAL] A view needs at least one column whereas a table doesn't...

2007-02-13 Thread Tom Lane
Gurjeet Singh [EMAIL PROTECTED] writes: I know the ERROR seems obvious, but then if we allow zero-column tables, then why not zero-column views? Or should the question be, why do we allow zero-column tables? Neither one is legal per the SQL spec. We allow zero-column tables because otherwise

[GENERAL] PGSQL 8.2.3 Installation problem

2007-02-13 Thread RPK
When I run the setup of PGSQL 8.2.3, it displays error while initializing database cluster. Error displayed is: Failed to execute initdb. Unable to set file system permissions. I am installing on Windows XP SP2 with administrator log in. -- View this message in context:

Re: [GENERAL] PGSQL 8.2.3 Installation problem

2007-02-13 Thread marcelo Cortez
hi there same things occurs to me. Any body install win32 version with success??? best regards MDC --- RPK [EMAIL PROTECTED] escribió: When I run the setup of PGSQL 8.2.3, it displays error while initializing database cluster. Error displayed is: Failed to execute initdb. Unable to

[GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
To make a long story short, I am archiving data from an original table to a table I created. This is a third party web application that I am doing this with, so I can't revise the structure/code of this application. With this said, if the original table goes through an insert or update action I

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread William Leite Araújo
2007/2/13, Laura McCord [EMAIL PROTECTED]: To make a long story short, I am archiving data from an original table to a table I created. This is a third party web application that I am doing this with, so I can't revise the structure/code of this application. With this said, if the original

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Ted Byers
Would it not be simpler to just create two trigger functions, one that acts on insert operations and a second that acts on update operations? A 30 second glance at the Postgresql documentation showed me that it is possible to have more than one row level trigger for a given table, which

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
I tried doing two different triggers as you suggested but I kept getting an error stating: psql:archive_news_articles.sql:75: ERROR: trigger archive_articles for relation news_content already exists psql:archive_news_articles.sql:80: ERROR: trigger update_archives for relation news_content

[GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Emi Lu
HEllo, I am looking for a psql method to get the bigger value of two numbers. For example, methodName(12.6, 3.8) Will return 12.6 Thanks! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Adam Rich
You want GREATEST() http://www.postgresql.org/docs/8.2/interactive/functions-conditional.ht ml#AEN13140 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emi Lu Sent: Tuesday, February 13, 2007 12:37 PM To: pgsql-general@postgresql.org Subject: [GENERAL]

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
About your last comment, I can't do any revisions of the third party application where the inserts and updates are occurring. Plus, this whole idea came from a workaround based on a glitch in the software where the expiration of articles is not occurring ,therefore I have to do a delete articles

Re: [GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Bricklen Anderson
Emi Lu wrote: HEllo, I am looking for a psql method to get the bigger value of two numbers. For example, methodName(12.6, 3.8) select greatest(12.6,3.8); ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an

Re: [GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Emi Lu
I am looking for a psql method to get the bigger value of two numbers. For example, methodName(12.6, 3.8) select greatest(12.6,3.8); It does not work for me, select greatest(12.6,3.8); ERROR: function greatest(numeric, numeric) does not exist HINT: No function matches the given name

Re: [GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Emi Lu
Emi Lu wrote: I am looking for a psql method to get the bigger value of two numbers. For example, methodName(12.6, 3.8) select greatest(12.6,3.8); It does not work for me, select greatest(12.6,3.8); ERROR: function greatest(numeric, numeric) does not exist HINT: No function matches

Re: [GENERAL] PostgreSQL and OpenLdap

2007-02-13 Thread Magnus Hagander
Cristiano Panvel wrote: It does not appear nothing in log, only in /var/log/message the error of failed in login. Feb 13 12:04:16 fns4 postgres[7055]: [4-1] FATAL: LDAP authentication failed for user scott Feb 13 12:04:20 fns4 postgres[7056]: [4-1] FATAL: LDAP authentication failed for

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Tom Lane
Laura McCord [EMAIL PROTECTED] writes: I tried doing two different triggers as you suggested but I kept getting an error stating: psql:archive_news_articles.sql:75: ERROR: trigger archive_articles for relation news_content already exists psql:archive_news_articles.sql:80: ERROR: trigger

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
Here is a question that I am stumped on: Does postgres even recognize last_inserted() as mysql does? I notice that the function fails on that line. Thanks, Laura Tom Lane wrote: Laura McCord [EMAIL PROTECTED] writes: I tried doing two different triggers as you suggested but I kept

[GENERAL] Using PITR for creating Hot Standby

2007-02-13 Thread Dhaval Shah
I am in a situation where we have to deploy a hot standby to a postgres db server. There is no custom tablespace and all data files are in $PGDATA I was thinking of using PITR []http://www.postgresql.org/docs/8.1/static/backup-online.html] to achieve that and here are my thoughts: 1.

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Alan Hodgson
On Tuesday 13 February 2007 11:35, Laura McCord [EMAIL PROTECTED] wrote: Here is a question that I am stumped on: Does postgres even recognize last_inserted() as mysql does? I notice that the function fails on that line. Not, that's just a MySQL function. You could, however, look for the

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Laura McCord
Ok, I think I am starting to put two-and-two together based on your thread and Ted's thread, I just realized that OLD. and NEW. are keywords in postgres. Alan Hodgson wrote: On Tuesday 13 February 2007 11:35, Laura McCord [EMAIL PROTECTED] wrote: Here is a question that I am stumped

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Ted
On Feb 13, 1:20 pm, [EMAIL PROTECTED] (Laura McCord) wrote: I tried doing two different triggers as you suggested but I kept getting an error stating: psql:archive_news_articles.sql:75: ERROR: trigger archive_articles for relation news_content already exists

Re: [GENERAL] Having a problem with my stored procedure

2007-02-13 Thread Ted
On Feb 13, 1:45 pm, [EMAIL PROTECTED] (Laura McCord) wrote: About your last comment, I can't do any revisions of the third party application where the inserts and updates are occurring. Plus, this whole idea came from a workaround based on a glitch in the software where the expiration of

Re: [GENERAL] Function in psql to Compare two numbers and return the bigger value

2007-02-13 Thread Steve Wampler
Emi Lu wrote: Does it mean it is not allowed to use select greatest(12.6,3.8) ? It may mean you're not running 8.1? Here's what I get: --- -psql Welcome to psql 8.1.4, the PostgreSQL interactive terminal. Type: \copyright for

Re: [GENERAL] Using PITR for creating Hot Standby

2007-02-13 Thread Kenneth Downs
Dhaval Shah wrote: I am in a situation where we have to deploy a hot standby to a postgres db server. There is no custom tablespace and all data files are in $PGDATA I was thinking of using PITR []http://www.postgresql.org/docs/8.1/static/backup-online.html] to achieve that and here are my

Re: [GENERAL] Using PITR for creating Hot Standby

2007-02-13 Thread Merlin Moncure
On 2/13/07, Dhaval Shah [EMAIL PROTECTED] wrote: I am in a situation where we have to deploy a hot standby to a postgres db server. There is no custom tablespace and all data files are in $PGDATA I was thinking of using PITR []http://www.postgresql.org/docs/8.1/static/backup-online.html] to

Re: [GENERAL] PGSQL 8.2.3 Installation problem

2007-02-13 Thread Paul Lambert
marcelo Cortez wrote: hi there same things occurs to me. Any body install win32 version with success??? best regards MDC --- RPK [EMAIL PROTECTED] escribió: When I run the setup of PGSQL 8.2.3, it displays error while initializing database cluster. Error displayed is: Failed to execute

Re: [GENERAL] getting postgres to emulate mysql/sqlserver bit datatype

2007-02-13 Thread Anton Melser
On 13/02/07, Tom Lane [EMAIL PROTECTED] wrote: Anton Melser [EMAIL PROTECTED] writes: ERROR: operator is not unique: boolean = integer I get this whether castcontext is 'a' or 'i'. If you make both cast directions the same priority then the system has no basis for choosing bool = bool over

[GENERAL] Advisory on possibly insecure security definer functions

2007-02-13 Thread Peter Eisentraut
It has come to the attention of the core team of the PostgreSQL project that insecure programming practice is widespread in SECURITY DEFINER functions. Many of these functions are exploitable in that they allow users that have the privilege to execute such a function to execute arbitrary code

[GENERAL] SEQUENCE primary key

2007-02-13 Thread gustavo halperin
Hello I have a question, if I have a table with a SEQUENCE primary key, that obviously, I doesn't give in each new row inserted. For example if the table locks: CREATE SEQUENCE id_seq; CREATE TABLE table ( idinteger DEFAULT nextval('id_seq') CONSTRAINT table_id PRIMARY

Re: [GENERAL] SEQUENCE primary key

2007-02-13 Thread John McCawley
In PostgreSQL 8 and up: SELECT lastval(); gustavo halperin wrote: Hello I have a question, if I have a table with a SEQUENCE primary key, that obviously, I doesn't give in each new row inserted. For example if the table locks: CREATE SEQUENCE id_seq; CREATE TABLE table ( id

Re: [GENERAL] SEQUENCE primary key

2007-02-13 Thread Chris
John McCawley wrote: In PostgreSQL 8 and up: SELECT lastval(); Actually it's better to use currval. See http://people.planetpostgresql.org/xzilla/index.php?/archives/169-Is-lastval-evil.html -- Postgresql php tutorials http://www.designmagick.com/ ---(end of

[GENERAL] suggestions on improving a query

2007-02-13 Thread Rajarshi Guha
Hi, I have a query that involves 3 tables. T select pubchem_compound.openeye_can_smiles, pubchem_compound.nist_inchi, dock.cid, dockscore_plp.* from dock, dockscore_plp, pubchem_compound where dock.target = '1YC1' and dock.dockid = dockscore_plp.id and dock.cid =

Re: [GENERAL] SEQUENCE primary key

2007-02-13 Thread Tom Lane
Chris [EMAIL PROTECTED] writes: Actually it's better to use currval. Right. Also, in 8.2 and up there's INSERT RETURNING, which is far more flexible --- for instance it could pull back an insertion timestamp. regards, tom lane ---(end of

Re: [GENERAL] suggestions on improving a query

2007-02-13 Thread Adam Rich
This line: Index Scan using plp_total_idx on dockscore_plp (cost=0.00..16733229.92 rows=4669988 width=80) (actual time=98.323..322537.605 rows=25197 loops=1) Means the planner did what it did, because it estimated there would be nearly 5 million rows. However, there were only 25,000. Have

Re: [GENERAL] suggestions on improving a query

2007-02-13 Thread Tom Lane
Rajarshi Guha [EMAIL PROTECTED] writes: However the clause: dock.target = '1YC1' and dock.dockid = dockscore_plp.id reduces the number of rows from 4.6M to 96K. The planner seems to be estimating about ten times that many. Perhaps increasing the statistics target for dock.target

Re: [GENERAL] suggestions on improving a query

2007-02-13 Thread Tom Lane
Adam Rich [EMAIL PROTECTED] writes: This line: Index Scan using plp_total_idx on dockscore_plp (cost=0.00..16733229.92 rows=4669988 width=80) (actual time=98.323..322537.605 rows=25197 loops=1) Means the planner did what it did, because it estimated there would be nearly 5 million rows.

Re: [GENERAL] pg_get_serial_sequence is inconsistent

2007-02-13 Thread Bruce Momjian
FYI, we have at least documented this behavior in 8.2.X: functionpg_get_serial_sequence/function returns the name of the sequence associated with a column, or NULL if no sequence is associated with the column. The first input parameter is a table name with optional schema, and the

[GENERAL] backup database by cloning itself

2007-02-13 Thread filippo
Hello, my database is not very big so I want to adopt this backup strategy: I want to clone my database every 1 hour to another database 'currenttime_mydatabase' in order to have 24 backup a day, overwriting the yesterday backups by today-same-time backups. This is good for me because I have

[GENERAL] Timestamp/Timezone - does this make sense?

2007-02-13 Thread Mike Harding
mvh= set time zone 'UTC'; SET mvh= select now(); now --- 2007-02-13 03:37:35.660652+00 (1 row) mvh= select timestamp with time zone '2007-01-01' at time zone 'America/Los_Angeles'; timezone - 2006-12-31

[GENERAL] Proper escaping for char(3) string, or PHP at fault, or me at fault?

2007-02-13 Thread semi-ambivalent
All, I have a char(3) column that has occasional values of this: (V) In a PHP-called nested query I've a line something like: select * from tableA where = any (select date from tableA where void ! = '(V)') group by date order by record This is throwing a query error in the log that blames the

Re: [GENERAL] Dumb question - how to tell if autovacuum is doing its job in 8.2.x

2007-02-13 Thread Shoaib Mir
Make sure you have stats collector enabled, if auto vacuum is doing the analyze and vacuum it should be recording that info in this view. For details on this you can have a look at -- http://www.postgresql.org/docs/8.2/interactive/monitoring-stats.html Just for a test try doing a VACUUM or

[GENERAL] Infinite loop in transformExpr()

2007-02-13 Thread Fernando Schapachnik
I've stumbled upon what seems to be a core-dumping infinite recursion in transformExpr(), on 8.1.6. Backtrace: Core was generated by `postgres'. Program terminated with signal 10, Bus error. Reading symbols from /usr/lib/libssl.so.3...(no debugging symbols found)...done. Loaded symbols for

[GENERAL] help and Links using postgreSQL with ASP

2007-02-13 Thread Pankaj
Hi Need help if there is any script source or links to provide help how to you PostgreSQL with ASP Thanks Regards Pankaj SELF REALIZATION IS THE FIRST ENCOUNTER WITH REALITY -Sahajayoga.org.

[GENERAL] Union Query Improvement

2007-02-13 Thread Ray Bannon
I have a query which is running a bit slowly, and I'm wondering if anyone has a design improvement. Basically it's a series of unions as follows: Select ID, plan_name from table/view Where plan_name = 'A' And rownum = 1 UNION Select ID, plan_name from table/view Where plan_name = 'B' And rownum =

[GENERAL] converting a specified year and week into a date

2007-02-13 Thread vanessa
hi guys, i was just wondering if it was at all possible to turn a year and a given week number into a real date just using postgresql commands? e.g. if i have year = 2004 and week = 1, can i turn that into say 2004-01-01 (so that the specified date is the one for the beginning of week 1

[GENERAL] Help, Can't figure out what is wrong with my stored procedure

2007-02-13 Thread loulou2u
To make a long story short, I am archiving data from an original table to a table I created. This is a third party web application that I am doing this with, so I can't revise the structure/code of this application. With this said, if the original table goes through an insert or update action I

[GENERAL] Slony Replication problem

2007-02-13 Thread Slawek
Hello, I tring to set up Slony replication and am having issues with repeatability. Configuration: 2 nodes Slony ver.: 1.2.6 OS: SuSE Linux 9.2 About 1/3 of the time, replication does not start properly. I think I've traced it down to the fact that sometimes the second node is not created

[GENERAL] Problem with 'tr' command

2007-02-13 Thread Kaushik, Sushil
I am having a problem running the 'tr' command: This is what I expected (tested in development environment) Version: HP-UX sdmw728a B.11.00 U 9000/800 sdmw728a:clmdev: /apdev/clmdev/cl_be/4300/bin x=PMRR sdmw728a:clmdev: /apdev/clmdev/cl_be/4300/bin echo $x | tr [A-Z] [a-z] pmrr

[GENERAL] [ADM #INO-38939-552]: [ANNOUNCE] Advisory on possibly insecure security definer functions

2007-02-13 Thread Administrator Az.pl
[english version below] Drodzy Państwo! niniejsza wiadomość jest automatycznym potwierdzeniem otrzymania zgłoszenia w Az.pl, na które prosimy nie odpowiadać. Uprzejmie dziękujemy za wysłane zgłoszenie i pragniemy zapewnić, że każde z Państwa zgłoszeń zostanie rozpatrzone z należyta

[GENERAL] Daniel Simmler is out off office

2007-02-13 Thread daniel . simmler
Ich werde ab 12.02.2007 nicht im Büro sein. Ich kehre zurück am 15.02.2007. Ihre E-Mails werden nicht weitergeleitet. Haben Sie Fragen zu Loomdata oder BaaN kontaktieren Sie bitte den Help Desk oder Jürg Gambon. Vielen Dank __ I will be back on Feb 15 2007. My

Re: [GENERAL] Infinite loop in transformExpr()

2007-02-13 Thread Tom Lane
Fernando Schapachnik [EMAIL PROTECTED] writes: I've stumbled upon what seems to be a core-dumping infinite recursion in transformExpr(), on 8.1.6. A test case would help. regards, tom lane ---(end of broadcast)--- TIP 5:

Re: [GENERAL] Union Query Improvement

2007-02-13 Thread Chris
Ray Bannon wrote: I have a query which is running a bit slowly, and I'm wondering if anyone has a design improvement. Basically it's a series of unions as follows: Select ID, plan_name from table/view Where plan_name = 'A' And rownum = 1 UNION Select ID, plan_name from table/view Where

Re: [GENERAL] Union Query Improvement

2007-02-13 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/13/07 07:46, Ray Bannon wrote: I have a query which is running a bit slowly, and I'm wondering if anyone has a design improvement. Basically it's a series of unions as follows: Select ID, plan_name from table/view Where plan_name = 'A'

Re: [GENERAL] Slony Replication problem

2007-02-13 Thread Chris
Slawek wrote: Hello, I tring to set up Slony replication and am having issues with repeatability. Probably best to ask on the slony list.. http://gborg.postgresql.org/pipermail/slony1-general/ Sign up here: http://gborg.postgresql.org/mailman/listinfo/slony1-general -- Postgresql php

Re: [GENERAL] backup database by cloning itself

2007-02-13 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/13/07 07:54, filippo wrote: Hello, my database is not very big so I want to adopt this backup strategy: I want to clone my database every 1 hour to another database 'currenttime_mydatabase' in order to have 24 backup a day, overwriting

[GENERAL] [ANNOUNCE] Advisory on possibly insecure security definer functions

2007-02-13 Thread Peter Eisentraut
It has come to the attention of the core team of the PostgreSQL project that insecure programming practice is widespread in SECURITY DEFINER functions. Many of these functions are exploitable in that they allow users that have the privilege to execute such a function to execute arbitrary code

Re: [GENERAL] Problem with 'tr' command

2007-02-13 Thread Chris
Kaushik, Sushil wrote: I am having a problem running the 'tr' command: I'd suggest finding a HP-UX mailing list, the postgres one isn't going to help you much here. -- Postgresql php tutorials http://www.designmagick.com/ ---(end of

Re: [GENERAL] Proper escaping for char(3) string, or PHP at fault, or me at fault?

2007-02-13 Thread Chris
semi-ambivalent wrote: All, I have a char(3) column that has occasional values of this: (V) In a PHP-called nested query I've a line something like: select * from tableA where = any (select date from tableA where void ! = '(V)') group by date order by record Shouldn't that be select * from

Re: [GENERAL] converting a specified year and week into a date

2007-02-13 Thread A. Kretschmer
am Tue, dem 13.02.2007, um 13:56:15 -0800 mailte vanessa folgendes: hi guys, i was just wondering if it was at all possible to turn a year and a given week number into a real date just using postgresql commands? e.g. if i have year = 2004 and week = 1, can i turn that into say

Re: [GENERAL] Timestamp/Timezone - does this make sense?

2007-02-13 Thread Tom Lane
Mike Harding [EMAIL PROTECTED] writes: Where does that extra 8 hours come from? Ellay is 8 hours west of UTC (at least on 1-Jan, at least till our congresscritters see fit to monkey with the DST laws again). What problem have you got with these answers? They look right to me.

[GENERAL] [ANNOUNCE] Advisory on possibly insecure security definer functions

2007-02-13 Thread Peter Eisentraut
It has come to the attention of the core team of the PostgreSQL project that insecure programming practice is widespread in SECURITY DEFINER functions. Many of these functions are exploitable in that they allow users that have the privilege to execute such a function to execute arbitrary code