[GENERAL] Errors ignored on restore
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.yahoo.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[GENERAL] problem with overloading the coalesce function
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$ LANGUAGE 'plpgsql' VOLATILE; ALTER FUNCTION coalesce(a int4, b varchar) OWNER TO postgres; I have added it to pg_catalog, but still I cant't use it, I get an error on the second parameter, apparently the function gets lost at some point. Any additional steps I need to complete? Thanks in advance, Emil __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [GENERAL] problem with overloading the coalesce function
--- Richard Huxton dev@archonet.com 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 varchar) RETURNS varchar AS ... I have added it to pg_catalog, but still I cant't use it, I get an error on the second parameter What is the error? The error is : invalid input syntax for integer That is,it expects an integer as a second parameter, since the first is an integer. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(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
[GENERAL] Syntax error in Execute statement
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: syntax error at or near $2 at character 20 QUERY: SELECT $1 into $2 I have put UID in quotes because it seems to be a keyword. Here is the table script: create TEMP table S_Users_To_Connection( UID integer NOT NULL ,ConnID integer NOT NULL ,LoginID integer NOT NULL ); Any suggestions ? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[GENERAL] Without OIDs
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. Any suggestions? __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
[GENERAL] How to find a temporary table
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. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[GENERAL] bug with if ... then ... clause in views
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 then at character 72 I don't have a clue what is going on here. Any suggestions? Thanks in advance, Emil __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
[GENERAL] Question on indexes
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://mail.yahoo.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] [SQL] lost in system tables
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 broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [SQL] [GENERAL] lost in system tables
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, but i need to check them out later from the system tables. The first one must be something like the 'deferrable' column in pg_constaint, but the second is still in vague. Emil __ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly