Re: [SQL] [ADMIN] Data insert

2005-08-20 Thread Aldor
1st --- if you use php you can use the function: "pg_escape_bytea()" when you want to retrieve the data from db you have to use: "pg_unescape_bytea()" for unescaping it see the php documentation on this function for more information 2nd --- if you want to insert biiig data volumes try eith

Re: [SQL] [ADMIN] Data insert

2005-08-20 Thread Michael Fuhr
On Sat, Aug 20, 2005 at 01:17:55PM -0400, Postgres Admin wrote: > I don't have any idea how to insert the type of data into PostgreSQL. > Basically, it's encrypted data in which I would like that keep raw format. If the data is binary then you could store it in a BYTEA column. How to get such da

[SQL] Data insert

2005-08-20 Thread Postgres Admin
Sorry for the attachment, but copying and pasting this data does not work. I don't have any idea how to insert the type of data into PostgreSQL. Basically, it's encrypted data in which I would like that keep raw format. Thanks for any help, J sample_data.pdf Description: Adobe PDF document --

Re: [SQL] Problem with self-made plpgsql-function / casting

2005-08-20 Thread Moritz Bayer
That's it!!! Thanks a lot!   Moritz   PS: Hope some day I'll be the one to be an help for newbies! I'm working on it!   2005/8/20, Tom Lane <[EMAIL PROTECTED]>: Moritz Bayer <[EMAIL PROTECTED]> writes: >  ERROR: function public.fc_editlanguage(integer, "unknown", "unknown",> integer) does not exist

Re: [SQL] Problem with self-made plpgsql-function / casting

2005-08-20 Thread Moritz Bayer
Thanks for your reply,   but your tip  didn't solve my problem. I used your function call:   select fc_editlanguage(0, 'German'::varchar, 'de'::varchar, 1); but still got an error:   ERROR:  function fc_editlanguage(integer, character varying, character varying, integer) does not existHINT:  No fun

Re: [SQL] Problem with self-made plpgsql-function / casting

2005-08-20 Thread Mark Dingee
Moritz, The issue is most likely with the passed parameters themselves, not the assignments within the function. When you call the function, be sure to cast arguments that don't comply with your function definition. For example: Look at your function call. Does it look like this? select fc_ed

Re: [SQL] Problem with self-made plpgsql-function / casting

2005-08-20 Thread Tom Lane
Moritz Bayer <[EMAIL PROTECTED]> writes: > ERROR: function public.fc_editlanguage(integer, "unknown", "unknown", > integer) does not exist > > CREATE OR REPLACE FUNCTION "public"."fc_editlanguage" (id bigint, name > varchar, kuerzel varchar, active smallint) RETURNS smallint AS The short answer

[SQL] Problem with self-made plpgsql-function / casting

2005-08-20 Thread Moritz Bayer
Hello,   I'm a newbie to postgres and trying to produce my first functions. Everything works fine as long as it takes numeric parameters, but when I'm trying to use varchar or text-parameters, it fails and throws the following exception:   ERROR:  function public.fc_editlanguage(integer, "unknown"

Re: [SQL] SQL CASE Statements

2005-08-20 Thread Halley Pacheco de Oliveira
> Has anybody done this? If so, can you send me a sample? CREATE TEMPORARY TABLE fruits (id SERIAL, name TEXT); INSERT INTO fruits VALUES (DEFAULT, 'banana'); INSERT INTO fruits VALUES (DEFAULT, 'apple'); CREATE TEMPORARY TABLE food (id SERIAL, name TEXT); INSERT INTO food VALUES (DEFAULT, 'apple'