t;a"
SUBTRACT
select articleID from tags where tab="b"
how do I do this in real SQL?
Replace "SUBSTRACT" with "EXCEPT"
(http://www.postgresql.org/docs/current/static/sql-select.html#SQL-EXCEPT).
--
Milen A. Radev
--
Sent via pgsql-sql mailing list (pgs
r messages of a particular priority are reported 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
8.4/static/xfunc-sql.html#XFUNC-SQL-VARIADIC-FUNCTIONS),
but right now the closest to what you want 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
ml and
look 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
ot recommended method -
http://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
- postgres"
before using psql should do the trick.
Please read "Chapter 21. 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> 1
(Mon =1 ... Sun =7?)
You 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
rs aggregates, functions, operators, types, 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".
--
M
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 at
error at or near "default"
> SQL state: 42601
> Character: 24"
>
--
Milen A. Radev
---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
quot;$1"
LINE 1: 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-E
been playing around with string functions but cannot seem to
> figure out 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
d like to know what is the current value
> of the sequence. I don't wish to know 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
s to be accurate upto the 6th decimal
> place, and was wondering if people use floating point types for this sort
> of thing.
--
Milen A. Radev
---(end of broadcast)---
TIP 6: explain analyze is your friend
gresql.org/docs/current/static/datatype-numeric.html#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. Rad
ng it like that. The sequence was created without any
> error. 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 nex
or 'replace' here -
http://www.postgresql.org/docs/8.2/static/functions-string.html.
--
Milen A. Radev
---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
l-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
Excerpt: "Quoting an identifier also makes it case-sensitive, whereas
unquoted names are always folded to lower case."
--
Milen A. Radev
---(end of broadcast)---
TIP 7: You can help support
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 recor
age 'plpgsql';
>
> I'm not having a lot of luck
Welcome to psql 8.2.0, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute
t; me as referencing 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
but I didn't find how to
> get 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)
ion also didn't provide much help ( the examples 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-
CK AS D ON ( C.CONTROLLER_ID = D.CONTROLLER_ID)
>
> WHERE D.CONTROLLER_ID IS NULL;
>
Or
(SELECT controller_id FROM control)
EXCEPT
(SELECT controller_id FROM datapack)
?
--
Milen A. Radev
---(end of broadcast)---
TIP 6: explain analyze is your friend
tmt (1, 1 , 1 , 'Grün') ;
INSERT 0 0
postgres=#
postgres=# SELECT filler from part where filler like 'MA%' or filler like
'Gr%' ;
filler
-
MAßßtab
MAßßtab
Grün
(3 rows)
Regards. Milen
-Original Message-
From: Thomas Beutin [mailto:[EMAI
|
C)
postgres=# l\l
List of databases
Name| Owner | Encoding
+---+---
db1| user1 | SQL_ASCII
postgres | pg| UTF8
template0 | pg| UTF8
template1 | pg| UTF8
How to solve my problem ?
Best Regards. Milen
--
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane
Sent: Wednesday, June 14, 2006 4:35 PM
To: Milen Kulev
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Prepared statements in PGSQL functions
"Milen Kulev" <[EMAIL PROTECTED]> w
e a function at all?
Regards. MILEN
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
tgresql.org/docs/8.1/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS
--
Milen A. Radev
---(end of broadcast)---
TIP 6: explain analyze is your friend
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 -
tgreSQL 8.0.4 on i686-pc-linux-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
ault value 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, ple
t; table. Аnd that two in "COUNT(s.skill_id)>=2" 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)
Hi all!,
I want to execute several SQL statements one after another.
Does anyone know if it is possible to create something like a "batch file"
which contains all SQL commands I want.
Best Regards:
Milen
---(end of broadcast)---
TIP 5
34 matches
Mail list logo