-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> testdb=#CREATE VIEW tableselecttemp AS SELECT DISTINCT f1, f2, f3 FROM
> table1_n;
> ERROR: DISTINCT not supported in views
In that case, you'll have to create a temporary table instead. This may
actually be faster, because you only have to search
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> I want to execute this query on some table2 in the same time :
>
> INSERT INTO table2_n(f1, f2, f3)
> SELECT DISTINCT f1, f2, f3 FROM table1_n ;
One way would be to do:
BEGIN
CREATE VIEW tableselecttemp AS
SELECT DISTINCT f1, f2, f3
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> INSERT INTO TABLE users VALUES ('test',crypt('passtest'));
AFAIK there is no builtin crypt function.
If you want one, use PL/perl to call the perl crypt function.
Ian Turner
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
> how can I write function which takes text from one field, replaces
> some characters and puts it in other field? I have array with old and
> new values.
Probably best to do this as an embedded perl sql function. Then it is
about 3 lines.
Ian
-