[GENERAL] Errors ignored on restore

2006-03-08 Thread Emil Rachovsky
Hi, I'm transfering data between postgre 8.0 and 8.1 using pg_dump and pg_restore, but I get "x errors ignored on restore". What could be the reason ? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.y

[GENERAL] Syntax error in Execute statement

2006-03-06 Thread Emil Rachovsky
Hello, I created a function "coalescec" which behaves the same as coalesce, but uses an integer and a string. Now I'm getting an error in the folowing statements : query := 'select "UID" from S_Users_To_Connection where ConnID = ' || coalescec(conn_id,'null'); execute query into nUID; ERROR:

Re: [GENERAL] problem with overloading the "coalesce" function

2006-03-06 Thread Emil Rachovsky
--- Richard Huxton wrote: > Emil Rachovsky wrote: > > > > Hi, > > I am trying to overload the "coalesce" function to > > accept an integer and a string. Here it is : > > > > CREATE OR REPLACE FUNCTION "coalesce"(a int4, b > >

[GENERAL] problem with overloading the "coalesce" function

2006-03-06 Thread Emil Rachovsky
Hi, I am trying to overload the "coalesce" function to accept an integer and a string. Here it is : CREATE OR REPLACE FUNCTION "coalesce"(a int4, b "varchar") RETURNS "varchar" AS $BODY$ begin if (a is null ) then return b; else return cast(a as varchar(15)); end if; end $BODY$ LAN

[GENERAL] Without OIDs

2006-03-02 Thread Emil Rachovsky
Hello, I'm creating a temporary table in a function and using Alter Table ... Without OIDs, but when the function is called for the second time I get an error "relation with OIDs ... doesn't exist" on an insert statement to the table. I'm using Postgre 8.0 which says that supports without OIDs. An

[GENERAL] How to find a temporary table

2006-01-27 Thread Emil Rachovsky
Hi, I am using PostgreSQL 8.1.0 . How can I find a temp table from my session, having the name of the table? Can anyone show me what query should I execute? I've tried some things but I receive mixed results of tables from different sessions, which is strange.

[GENERAL] bug with if ... then ... clause in views

2006-01-18 Thread Emil Rachovsky
While trying to create some views I stumbled on some problem with using the if-then clause. Here is a simple example : CREATE OR REPLACE VIEW public.SomeView as select d.id, if (true) then d.DocNumber endif from public.Z_Documents as d; I get the following error : syntax error at or near "t

[GENERAL] Question on indexes

2005-12-19 Thread Emil Rachovsky
Hi, Can anyone show me a simple way of creating an index in PostGre like that: create index indName on someTable(someIntColumn DESC) ? Thanks In Advance, Emil __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http:

Re: [SQL] [GENERAL] lost in system tables

2005-12-06 Thread Emil Rachovsky
> Those parameters are specified when you declare the > foreign key. Look here, > in the section describing "references": > http://www.postgresql.org/docs/8.1/interactive/sql-createtable.html > > Luca Thank you,Luca I know that these parameters are specified when you declare the foreign key, bu

Re: [GENERAL] [SQL] lost in system tables

2005-12-06 Thread Emil Rachovsky
Thank you,Tom, As for the description of 'nulls' I have taken it as it is from the Sybase help file :) __ Yahoo! DSL – Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com ---(end of broad

[GENERAL] lost in system tables

2005-12-06 Thread Emil Rachovsky
I am trying to find the equivalent of these two Sybase system columns : check_on_commit (Y/N) - Indicates whether INSERT and UPDATE commands should wait until the next COMMIT command to check if foreign keys are valid. A foreign key is valid if, for each row in the foreign table, the values in