[GENERAL] How to release SET() in PgSQL?

2001-02-21 Thread Andrey Y. Mosienko
Hello All! I used MySQL for a long time. There is SET() conception. I can define SET('one','two','three') and use that type: CREATE TABLE "test" ( "a" SET('one','two','three') }; And then: SELECT * FROM test WHERE a = 'one'; or SELECT * FROM test WHERE a like 'one,three'; How can

[GENERAL] Strange behaviour of PL/Perl

2001-02-24 Thread Andrey Y. Mosienko
Hello All! I just included PL/Perl language in my database. Created function: CREATE FUNCTION and_with_mask(int2, int2) RETURNS int2 AS ' return $_[0] & $_[1] ' LANGUAGE 'plperl'; select and_with_mask(4,

[GENERAL] INHERITS behavor

2001-03-24 Thread Andrey Y. Mosienko
I am using PGSQL 7.1RC1. CREATE TABLE "test" ( "id" int4 DEFAULT nextval('"test_id_seq"'::text) NOT NULL, "val" int4, CONSTRAINT "test_pkey" PRIMARY KEY ("id") ); CREATE TABLE test_1 ( ) INHERITS (test); Do: INSERT INTO "test_1" (

Re: [GENERAL] Sort by foreign date column

2001-08-21 Thread Andrey Y. Mosienko
Tom Lane wrote: > > > On Tue, 21 Aug 2001, Andrey Y. Mosienko wrote: > > But in Russia we have the next date format: DD-MM-. > > Just setting DateStyle to 'SQL' would get you approximately what you > want: > > regression=# set DateStyle TO SQL;