[SQL] BLOB
Hallo. I was just searching documents how to define BLOB in postgres and couldn't find any hints. Could somebody enlighten me? Postgres is 7.0.3. I need to insert into DB text field more than 8000 symbols and there is no way, I can upgrade postgres to 7.1, so only way I see it's possible, is by defining a blob. Greetings, Antti ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[SQL] DISTINCT ON () with UNION
How can you use a distinct on () including the whole union. eg select distinct on (valutaid) valutaid, short from valuta UNION select landid, land from land order by valutaid; table: valuta valutaidvaluta 1 USD 2 SEK table: land landid land 1 Sweden 2 USA 3 Norway The above would give 1 USD 1 Sweden 2 SEK 2 USA 3 Norway What I would like to get is 1 USD 2 SEK 3 Norway I did specify distinct on (valutaid) anyways =) Any suggestions? Best regards Per-Olof Pettersson ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [SQL] DISTINCT ON () with UNION
[EMAIL PROTECTED] writes: > How can you use a distinct on () including the whole union. In 7.1 you can write select distinct ... from (select ... union select ...) ss; regards, tom lane ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
[SQL] how to remove ?
How to remove from this mailing list ? > "Marc Lamothe" <[EMAIL PROTECTED]> writes: > > The subnet_number column is a varchar(16) which I assume you can compare > > with a text data type, which is what host() returns. > > Are you on a pre-7.1 Postgres release? host() is buggy before 7.1 --- > it includes a trailing null in its output, which it shouldn't oughta > have done. You can't see the null from outside the system, but it > manages to mess up text comparisons anyway. > > BTW, you should consider using inet or cidr datatype for that column > rather than varchar... > > regards, tom lane > > ---(end of broadcast)--- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) > -- Subhramanya Shiva, Programmer Archean InfoTech pvt.Ltd. Hyderabad, India http://www.archeanit.com ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
