Please send the complete DDL for your function and the tables it uses.
Also inform us of the database version you're using.
>>> "Professor Flávio Brito" <[EMAIL PROTECTED]> 2008-02-27
21:42 >>>
Hi
After I did it I received it
SELECT * FROM search_password('Paul');
ERROR: set-valued functi
"miquel_ibanez" <[EMAIL PROTECTED]> writes:
> CREATE TYPE t_cod_t_activ AS (
> cod_t_activ CHAR(10)
> );
If you just want an alias for char(10), a domain would probably work
better. CREATE TYPE AS is meant for creating multi-field row types.
> Does it mean that I cannot create
Dawid,
> But you are right, though! I just need to leave off the subselect!
> Thanks! SELECT h.* FROM haystack h JOIN needles ON straw = ANY (straws);
>
> (not exactly what I was looking for, but it works ;))
Yeah, the problem with your first query is that it's returning a rowset of
arrays, no
On Thu, Feb 28, 2008 at 1:11 AM, Josh Berkus <[EMAIL PROTECTED]> wrote:
> Dawid,
> >SELECT * FROM foo WHERE t = ANY (SELECT '{x4,5,zzz}'::text[]);
> > ERROR: operator does not exist: text = text[]
> > HINT: No operator matches the given name and argument type(s). You
> > might need to add
Dawid,
>SELECT * FROM foo WHERE t = ANY (SELECT '{x4,5,zzz}'::text[]);
> ERROR: operator does not exist: text = text[]
> HINT: No operator matches the given name and argument type(s). You
> might need to add explicit type casts.
Drop the second SELECT, I think.
postgres=# select 'x' = ANY
A simple text case
=# CREATE TEMP TABLE foo (t text);
CREATE TABLE
=# INSERT INTO foo SELECT 'x'||n FROM generate_series(1,100) AS x(n);
INSERT 0 100
This works:
SELECT * FROM foo WHERE t = ANY ('{x4,5,zzz}'::text[]);
And this works too:
SELECT * FROM foo WHERE t IN (SELECT t FROM foo LIMIT
Hello
I have just started with postgreSQL.
I have a file with the following commands :
CREATE TYPE t_cod_t_activ AS (
cod_t_activ CHAR(10)
);
CREATE TABLE tip_activ (
id_tip_activt_cod_t_activ,
des_t_activ t_des_t_activ
Hi
After I did it I received it
SELECT * FROM search_password('Paul');
ERROR: set-valued function called in context that cannot accept a set
SQL state: 0A000
Context: PL/pgSQL function "search_password(" line 14 at return next
Error at WHERE login= Paul ??
Thanks for your help
Flávio
2008/
Dean Gibson (DB Administrator) wrote:
...For example, I think phpBB is the only major message board software
that supports PostgreSQL (see
http://www.phpbb.com/about/features/compare.php ), and in fact has for
some time. Of course, they have a DB abstraction layer (wow, what an
concept!), whi
Sofer, Yuval wrote:
I need to extract table DDL (create script) from database connection
(using sql, by retrieving system table info or by activating some pg
function)
This command should output the SQL you need...
echo '\d tablename' | psql -E
---(end of broadcast
"Stefan Scheidegger" <[EMAIL PROTECTED]> writes:
> Why is this not possible? It seems that this is about inheritance. When I
> reference directly to tbl_child1, everything works just fine.
I'm afraid inheritance doesn't work with foreign key references. You can have
references to specific tables
am Wed, dem 27.02.2008, um 5:22:33 -0600 mailte Sofer, Yuval folgendes:
> Hi
>
>
>
> I need to extract table DDL (create script) from database connection (using
> sql, by retrieving system table info or by activating some pg function)
>
>
>
> Is this possible in postgres?
Why not using p
Hi
I need to extract table DDL (create script) from database connection
(using sql, by retrieving system table info or by activating some pg
function)
Is this possible in postgres?
Please help
Thanks
Yuval Sofer
BMC Software
CTM&D Business Unit
DBA Team
972-52-4286-282
[EMAI
2008/2/27, Bart Degryse <[EMAIL PROTECTED]>:
>
>
> For rather "simple" queries like this one PostgreSQL indeed seems to be
> quite smart.
> I have quite a lot of statements where it does make a difference though
> (PostgreSQL 8.2.4).
I would rather find a situation where an explicit join is planne
Hi all
I’m confronted with the following problem:
I have a base table with several child tables which also use the parent’s
primary key as their own primary key:
CREATE TABLE tbl_parent
(
p_id serial NOT NULL,
p_time timestamp(6) with time zone NOT NULL DEFAULT '1970-01-01
01:00:00+01'::
For rather "simple" queries like this one PostgreSQL indeed seems to be quite
smart.
I have quite a lot of statements where it does make a difference though
(PostgreSQL 8.2.4).
As long as I have one statement where it makes a difference I will use the join
rather than the IN(subselect) just to b
2008/2/27, Bart Degryse <[EMAIL PROTECTED]>:
>
> I would also suggest you replace the
> ...t.cod_user IN (subselect)
> by a join construction. I think it's more performant.
In recent versions PostgreSQL is quite smart when planning IN, so that
shouldn't be a concern.
Markus
--
Markus Bertheau
B
17 matches
Mail list logo