Re: [SQL] RAISE NOTICE

2009-05-08 Thread Milen A. Radev
to the client, written to the server log, or both is controlled by the log_min_messages and client_min_messages configuration variables. See Chapter 18 for more information. -- Milen A. Radev -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http

Re: [SQL] Variable number or arguments to a function possible?

2009-04-24 Thread Milen A. Radev
is function overloading (http://www.postgresql.org/docs/current/static/xfunc-overload.html). -- Milen A. Radev -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] Re: How to insert Images(bnp,png,etc) into Postgresql and how to retrive the inserted Imaged using C#.net

2008-12-18 Thread Milen A. Radev
for Working with binary data and bytea datatype. -- Milen A. Radev -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] How to provide password to pg_dump command ?

2008-09-09 Thread Milen A. Radev
://www.postgresql.org/docs/current/static/libpq-envars.html (look for PGPASSWORD). -- Milen A. Radev -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] psql: FATAL: Ident authentication failed for user postgres

2008-09-08 Thread Milen A. Radev
. Client Authentication (http://www.postgresql.org/docs/current/static/client-authentication.html) for details. -- Milen A. Radev -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

[SQL] Re: Get day name(Mon, Tue... Sun) and day number (1, 2...7) from a date

2008-07-30 Thread Milen A. Radev
need TO_CHAR (http://www.postgresql.org/docs/current/static/functions-formatting.html) - SELECT to_char(current_date, 'Dy'). -- Milen A. Radev -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] comment on COLUMN, broken or misunderstanding?

2008-02-17 Thread Milen A. Radev
, relations (tables, views, indexes, sequences, large objects), rules, and triggers.' (http://www.postgresql.org/docs/8.2/static/app-psql.html, look for \dd). You could see the comment for the column with \d+ table_name. -- Milen A. Radev ---(end of broadcast

Re: [SQL] PL/pgSQL question

2008-02-14 Thread Milen A. Radev
res x%ROWTYPE; BEGIN if $1 THEN RETURN NEXT res; ELSE RETURN; END IF; END;$_$ LANGUAGE plpgsql; -- Milen A. Radev ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating

Re: [SQL] How to use serial variable to insert into muiti-recrods?

2007-09-06 Thread Milen A. Radev
-- Milen A. Radev ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Re: [SQL] Table-name as parameter to plpgsql

2007-07-30 Thread Milen A. Radev
: INSERT INTO $1 (some_field) VALUES('some_value') Any hints on how to use function-parameters as table-names like I'm trying to above? Use EXECUTE (http://www.postgresql.org/docs/current/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN). -- Milen A. Radev

Re: [SQL] simple SQL question

2007-06-25 Thread Milen A. Radev
a quick solution. Does anyone have any suggestions? Use to_char(int, text), details here - http://www.postgresql.org/docs/current/static/functions-formatting.html -- Milen A. Radev ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [SQL] system table storing sequence attributes

2007-05-22 Thread Milen A. Radev
this in the same session where I add/remove records. Why do you need to know that? I can't think of any reason. [...] -- Milen A. Radev ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] Floating point type to store numbers

2007-04-17 Thread Milen A. Radev
#DATATYPE-FLOAT) : - If you require exact storage and calculations (such as for monetary amounts), use the numeric type instead. So if you decide to use floats after this warning you are on your own. -- Milen A. Radev ---(end of broadcast)--- TIP

Re: [SQL] Floating point type to store numbers

2007-04-17 Thread Milen A. Radev
. -- Milen A. Radev ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Serial

2007-04-03 Thread Milen A. Radev
. But for the create table i get ERROR: syntax error at or near nextval at character 38 What should i do? Add the missing default: CREATE TABLE mytable ( n_gen int DEFAULT nextval('seq_mytable_n_gen'), mycolumn1 int, mycolumn2 int ); -- Milen A. Radev

Re: [SQL] CREATE TABLE

2007-03-09 Thread Milen A. Radev
-sensitive, whereas unquoted names are always folded to lower case. -- Milen A. Radev ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Re: [SQL] Help with quotes in plpgsql

2006-12-19 Thread Milen A. Radev
setof text as $$ milen$ declare milen$ a record; milen$ begin milen$ select into a now() - interval '$1 day'; milen$ return next a; milen$ return; milen$ end milen$ $$ language 'plpgsql'; CREATE FUNCTION milen= No problems here. What version are you using? -- Milen A. Radev

Re: [SQL] Help with quotes in plpgsql

2006-12-19 Thread Milen A. Radev
Richard Ray написа: On Tue, 19 Dec 2006, Milen A. Radev wrote: Richard Ray : How should this be properly quoted create or replace function test(integer) returns setof text as $$ declare a record; begin select into a now() - interval '$1 day'; return next a; return

Re: [SQL] Omission of 'FROM' ? diff between pgsql 7.4.1 and pgsql 8.1.4

2006-09-15 Thread Milen A. Radev
this problem. Anyone with more knowledge that can point me in the right direction? Look here for add_missing_from - http://www.postgresql.org/docs/8.1/static/runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-VERSION -- Milen A. Radev ---(end of broadcast

Re: [SQL] Mac Address

2006-09-02 Thread Milen A. Radev
the MAC Address. Is it possible ? No - the client and the server communicate using TCP/IP as transport/internet layer but that does not mean they use Ethernet as network access layer. -- Milen A. Radev ---(end of broadcast)--- TIP 2: Don't 'kill -9

Re: [SQL] Triggers using PL/pgSQL

2006-07-31 Thread Milen A. Radev
in C). I was mainly looking for example showing how to refer 'OLD' and 'NEW' rows using PL/pgSQL. Can someone please direct me to some such examples? http://www.postgresql.org/docs/8.1/static/plpgsql-trigger.html -- Milen A. Radev ---(end of broadcast

Re: [SQL] How to find entries missing in 2nd table?

2006-07-11 Thread Milen A. Radev
) ? -- Milen A. Radev ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Counting the rows INSERTed/UPDATEd?

2006-05-01 Thread Milen A. Radev
/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS -- Milen A. Radev ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [SQL] Interval subtracting

2006-02-18 Thread Milen A. Radev
-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) / How many days are there in a month? -- Milen A. Radev ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [SQL] Interval subtracting

2006-02-18 Thread Milen A. Radev
Milorad Poluga написа: On Saturday 18 February 2006 15:24, Milen A. Radev wrote: Milorad Poluga написа: Hi all, Is there something incorrect in the above query ? SELECT '10 years 1 mons 1 days'::interval - '9 years 10 mons 15 days'::interval ?column? --- 3 mons

Re: [SQL] new rule syntax?

2006-02-05 Thread Milen A. Radev
of add_missing_from setting (http://www.postgresql.org/docs/8.1/static/runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-VERSION). -- Milen A. Radev ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

[SQL] Difficulties with a master-detail query

2005-09-23 Thread Milen A. Radev
is there because the count of the languages. Any ideas for simpler and more universal query? Please CC me, because I'm not subscribed. -- Milen A. Radev ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http